]> git.tdb.fi Git - libs/datafile.git/commitdiff
Force correct conversion of symbols
authorMikko Rasa <tdb@tdb.fi>
Sun, 29 Aug 2021 22:52:34 +0000 (01:52 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 29 Aug 2021 22:52:34 +0000 (01:52 +0300)
MSVC attempts to use the conversion operator in Symbol rather than
Value's constructor.

source/binaryparser.cpp
source/statement.cpp

index e4282aea8f64ae3cf23eec698f885ab2bcd823b6..8e16498c32ce7dde8380f7c36480057a07efc7c9 100644 (file)
@@ -62,7 +62,7 @@ Statement BinaryParser::parse()
                        result.args.push_back(parse_bool());
                        break;
                case SymbolType::signature:
-                       result.args.push_back(parse_symbol());
+                       result.args.push_back(Value(parse_symbol()));
                        break;
                }
        }
index baa9054e0cfb2f50cbb95ee17074d55dac3b9d0e..e6b31a72b1096e71d71adf7ea24fc7db290f5cb6 100644 (file)
@@ -52,7 +52,7 @@ Statement &Statement::append_from_token(const Token &token)
                else if(token.str=="false")
                        return append(false);
                else
-                       return append(Symbol(token.str));
+                       return append(Value(Symbol(token.str)));
        }
        else
                throw invalid_argument("Statement::append_from_token");