From cac0716e8c12088ba833cb28809f5a7b8430a68d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 1 Dec 2012 11:32:19 +0200 Subject: [PATCH] Add the target type to lexical_cast invocations --- source/textwriter.cpp | 2 +- source/type.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/textwriter.cpp b/source/textwriter.cpp index 5212c97..c870ba0 100644 --- a/source/textwriter.cpp +++ b/source/textwriter.cpp @@ -37,7 +37,7 @@ void TextWriter::write_(const Statement &st, unsigned level) else if(i->get_signature()==BoolType::signature) out.write(i->get() ? "true" : "false"); else if(i->get_signature()==IntType::signature) - out.write(lexical_cast(i->get())); + out.write(lexical_cast(i->get())); else if(i->get_signature()==FloatType::signature) out.write(format(float_format, i->get())); else if(i->get_signature()==SymbolType::signature) diff --git a/source/type.h b/source/type.h index 85cfec4..17545ba 100644 --- a/source/type.h +++ b/source/type.h @@ -12,7 +12,7 @@ struct Symbol std::string name; template - Symbol(const T &n): name(lexical_cast(n)) { } + Symbol(const T &n): name(lexical_cast(n)) { } template operator T() const { return lexical_cast(name); } }; -- 2.43.0