From: Mikko Rasa Date: Sun, 8 Mar 2009 15:35:26 +0000 (+0000) Subject: Fix a problem with MATCH_MASK handling in Regex X-Git-Tag: strings-1.1~5 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7735d609f5ecc2ae924d82c1395f028df9cfabd9;p=libs%2Fcore.git Fix a problem with MATCH_MASK handling in Regex Explicitly cast both arguments to pow to the same type so mingw doesn't get confused --- diff --git a/source/lexicalcast.cpp b/source/lexicalcast.cpp index cdd5578..9ba642f 100644 --- a/source/lexicalcast.cpp +++ b/source/lexicalcast.cpp @@ -305,7 +305,7 @@ string flt_to_str(T v, const Fmt &f) } // Apply rounding - w+=5.0l/pow(10.0l, digits); + w+=5.0l/pow(10.0l, static_cast(digits)); if(w>10) { // Rounding bumped us to the next exponent, deal with it diff --git a/source/regex.cpp b/source/regex.cpp index 9ba089d..7e9c8b0 100644 --- a/source/regex.cpp +++ b/source/regex.cpp @@ -472,9 +472,9 @@ bool Regex::run(const string &str, const string::const_iterator &begin, RegMatch { unsigned char m=*(j->citer+(c>>3)); match_result=m&(1<<(c&7)); - input_consumed=true; - j->citer+=32; } + input_consumed=true; + j->citer+=32; } else if(instr==MATCH_ANY) {