From: Mikko Rasa Date: Sun, 29 Aug 2021 22:52:34 +0000 (+0300) Subject: Force correct conversion of symbols X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b3b3fc2caf409f8c8ba523bbb3519af13b17e66e;p=libs%2Fdatafile.git Force correct conversion of symbols MSVC attempts to use the conversion operator in Symbol rather than Value's constructor. --- diff --git a/source/binaryparser.cpp b/source/binaryparser.cpp index e4282ae..8e16498 100644 --- a/source/binaryparser.cpp +++ b/source/binaryparser.cpp @@ -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; } } diff --git a/source/statement.cpp b/source/statement.cpp index baa9054..e6b31a7 100644 --- a/source/statement.cpp +++ b/source/statement.cpp @@ -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");