From ee12eeea9deeebafac2f195712cb17a32040b68b Mon Sep 17 00:00:00 2001 From: Blake-Madden Date: Tue, 26 Dec 2023 07:17:14 -0500 Subject: [PATCH] Remove pointer arithmetic, make assingment less complicated and ambiguous --- tinyexpr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tinyexpr.cpp b/tinyexpr.cpp index dc29925..9946ef5 100644 --- a/tinyexpr.cpp +++ b/tinyexpr.cpp @@ -919,7 +919,8 @@ void te_parser::next_token(te_parser::state* theState) else { /* Look for an operator or special character. */ - const auto tok = theState->m_next++[0]; + const auto tok = *theState->m_next; + std::advance(theState->m_next, 1); if (tok == '+') { theState->m_type = te_parser::state::token_type::TOK_INFIX;