From 7735d609f5ecc2ae924d82c1395f028df9cfabd9 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 8 Mar 2009 15:35:26 +0000 Subject: [PATCH] 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 --- source/lexicalcast.cpp | 2 +- source/regex.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.43.0