From: Daniel Karbach Date: Sun, 26 Nov 2017 13:51:10 +0000 (+0100) Subject: fix return value of tsr get double X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=c51b3bbef5c9b8ab52f55d46f08c5992fe574f70;p=blobs.git fix return value of tsr get double --- diff --git a/src/io/TokenStreamReader.hpp b/src/io/TokenStreamReader.hpp index 8aa2d8b..c9043d1 100644 --- a/src/io/TokenStreamReader.hpp +++ b/src/io/TokenStreamReader.hpp @@ -52,8 +52,8 @@ public: bool GetBool(); bool AsBool() const; - float GetDouble(); - float AsDouble() const; + double GetDouble(); + double AsDouble() const; float GetFloat(); float AsFloat() const; int GetInt(); diff --git a/src/io/token.cpp b/src/io/token.cpp index 4e7483f..ef2d26c 100644 --- a/src/io/token.cpp +++ b/src/io/token.cpp @@ -484,12 +484,12 @@ bool TokenStreamReader::AsBool() const { } } -float TokenStreamReader::GetDouble() { +double TokenStreamReader::GetDouble() { Next(); return AsDouble(); } -float TokenStreamReader::AsDouble() const { +double TokenStreamReader::AsDouble() const { Assert(Token::NUMBER); return stod(GetValue()); }