mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 11:45:59 +08:00
Split on ; token instead of trying to capture submatches.
This commit is contained in:
parent
1d63925bda
commit
e4fd688c78
@ -41,9 +41,9 @@ void UI_Point::_set_value(Slic3r::Pointf value) {
|
||||
|
||||
void UI_Point::_set_value(std::string value) {
|
||||
/// parse the string into the two parts.
|
||||
std::regex format_regex("([0-9.]+);([0-9.]+)");
|
||||
auto f_begin { std::sregex_iterator(value.begin(), value.end(), format_regex) };
|
||||
auto f_end { std::sregex_iterator() };
|
||||
std::regex format_regex(";");
|
||||
auto f_begin { std::sregex_token_iterator(value.begin(), value.end(), format_regex, -1) };
|
||||
auto f_end { std::sregex_token_iterator() };
|
||||
|
||||
if (f_begin != f_end) {
|
||||
auto iter = f_begin;
|
||||
|
Loading…
x
Reference in New Issue
Block a user