]> git.tdb.fi Git - libs/datafile.git/commitdiff
Explicitly convert regex match to boolean
authorMikko Rasa <tdb@tdb.fi>
Sun, 31 Oct 2021 18:53:07 +0000 (20:53 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 31 Oct 2021 18:53:07 +0000 (20:53 +0200)
tool/compiler.cpp

index 8360ee6ce35931b52f5867bfb75ffdddeb713df1..b7f310c9c556d0deb3b0dac2b803049fa7868875 100644 (file)
@@ -170,7 +170,7 @@ void ForEach::finish()
        {
                bool match = false;
                for(list<string>::const_iterator j = patterns.begin(); (j!=patterns.end() && !match); ++j)
-                       match = Regex(*j).match(f);
+                       match = static_cast<bool>(Regex(*j).match(f));
                for(list<string>::const_iterator j = excludes.begin(); (j!=excludes.end() && match); ++j)
                        match = !Regex(*j).match(f);
                if(match)