From: Mikko Rasa Date: Sat, 1 Dec 2012 09:32:19 +0000 (+0200) Subject: Add the target type to lexical_cast invocations X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=commitdiff_plain;h=cac0716e8c12088ba833cb28809f5a7b8430a68d Add the target type to lexical_cast invocations --- 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); } };