Created
June 5, 2020 13:51
-
-
Save rkollataj/28865272b1ed7791f8817484bad458c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/dbcparser.cpp b/src/dbcparser.cpp | |
index 6a64a94..6bf58ab 100644 | |
--- a/src/dbcparser.cpp | |
+++ b/src/dbcparser.cpp | |
@@ -97,7 +97,7 @@ bool DBCParser::parse(const std::string& data) noexcept | |
strings phrases; | |
std::deque<std::string> idents, signs, sig_sign, ecu_tokens; | |
- std::deque<float> numbers; | |
+ std::deque<double> numbers; | |
bool mux = false; | |
int muxNdx = -1; | |
@@ -166,7 +166,7 @@ bool DBCParser::parse(const std::string& data) noexcept | |
parser["number"] = [&numbers](const peg::SemanticValues& sv) { | |
try { | |
cdb_debug("Found number {}", sv.token()); | |
- auto number = std::stof(sv.token()); | |
+ auto number = std::stod(sv.token()); | |
cdb_trace("Found number {}", number); | |
numbers.push_back(number); | |
} catch (const std::exception& ex) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment