From a80ec9cf7e27f41240f64869ea836688249950d2 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 13 Jul 2026 15:04:57 +0200 Subject: [PATCH] fix langth for json in shuntingyard, do not remove emty strings --- src/core/shuntingYard.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/core/shuntingYard.cpp b/src/core/shuntingYard.cpp index 3cd0593f1..cfc09e8d2 100644 --- a/src/core/shuntingYard.cpp +++ b/src/core/shuntingYard.cpp @@ -42,17 +42,8 @@ std::deque exprToTokens(const std::string & expr) { i += (*p == '{') ? 1 : (*p == '}') ? -1 : 0; ++p; } - if (*p) { - ++p; - } - // Use string_view to avoid unnecessary string copies - std::string_view s(b, p - b); - auto n = s.find("\"\""); - while (n != std::string_view::npos) { - s.remove_prefix(n + 2); - n = s.find("\"\""); - } - tokens.emplace_back(Token::Type::String, std::string(s), -3); + const auto s = std::string(b, p); + tokens.emplace_back(Token::Type::String, s, -3); if (*p == '\0') { --p; }