Commit b0cd1361 authored by Volker Krause's avatar Volker Krause
Browse files

Attempt to fix level parser test failures on 32bit systems

parent 17280400
Pipeline #254097 passed with stage
in 7 minutes and 38 seconds
......@@ -44,7 +44,7 @@ void LevelParser::parse(QByteArray &&level, OSM::Element e, const std::function<
}
if (c == ';') {
const auto l = qstrtod(level.constData() + numStartIdx, nullptr, nullptr) * 10; // ### waiting for std::from_chars
const auto l = (int)(qstrtod(level.constData() + numStartIdx, nullptr, nullptr) * 10.0); // ### waiting for std::from_chars
if (rangeBegin <= l) {
for (int j = rangeBegin; j <= l; j += 10) {
callback(j, e);
......@@ -61,7 +61,7 @@ void LevelParser::parse(QByteArray &&level, OSM::Element e, const std::function<
if (numStartIdx < 0) {
numStartIdx = i;
} else {
rangeBegin = qstrtod(level.constData() + numStartIdx, nullptr, nullptr) * 10; // ### waiting for std::from_chars
rangeBegin = (int)(qstrtod(level.constData() + numStartIdx, nullptr, nullptr) * 10.0); // ### waiting for std::from_chars
numStartIdx = -1;
}
}
......@@ -70,7 +70,7 @@ void LevelParser::parse(QByteArray &&level, OSM::Element e, const std::function<
if (numStartIdx >= level.size() || numStartIdx < 0) {
return;
}
const auto l = qstrtod(level.constData() + numStartIdx, nullptr, nullptr) * 10; // ### waiting for std::from_chars
const auto l = (int)(qstrtod(level.constData() + numStartIdx, nullptr, nullptr) * 10.0); // ### waiting for std::from_chars
if (rangeBegin <= l) {
for (int j = rangeBegin; j <= l; j += 10) {
callback(j, e);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment