Skip to content
Snippets Groups Projects
Commit 2838061f authored by trilene's avatar trilene
Browse files

Avoid std::from_chars for now

parent 51a559ab
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,6 @@
#include <QQuickItem>
#include <algorithm>
#include <cctype>
#include <charconv>
#include <cstdlib>
#include <cstring>
#include <optional>
......@@ -129,10 +128,9 @@ std::pair<int, int>
tokenise(std::string_view str, char delim)
{
std::pair<int, int> ret;
ret.first = std::atoi(str.data());
auto pos = str.find_first_of(delim);
auto s = str.data();
std::from_chars(s, s + pos, ret.first);
std::from_chars(s + pos + 1, s + str.size(), ret.second);
ret.second = std::atoi(str.data() + pos + 1);
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment