]> git.tdb.fi Git - libs/gl.git/commitdiff
Explicitly cast regex match to boolean
authorMikko Rasa <tdb@tdb.fi>
Tue, 2 Nov 2021 11:13:41 +0000 (13:13 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 2 Nov 2021 13:11:17 +0000 (15:11 +0200)
source/glsl/parser.cpp

index cc0233eab702b468704cc2b9b8703e383aeee813..4e8ff97aa894864632fcb47e044b3102d04b9f70 100644 (file)
@@ -194,7 +194,7 @@ bool Parser::is_type(const string &token)
 bool Parser::is_identifier(const string &token)
 {
        static Regex re("^[a-zA-Z_][a-zA-Z0-9_]*$");
-       return re.match(token);
+       return static_cast<bool>(re.match(token));
 }
 
 template<typename T>