From 0c31d81711785fd73cfac5b07083f7f075416e1d Mon Sep 17 00:00:00 2001 From: Mike Bogdanov Date: Thu, 13 Jul 2017 12:41:23 +0300 Subject: [PATCH] fixed PVS-Studio warnings V728 --- include/chaiscript/language/chaiscript_parser.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/chaiscript/language/chaiscript_parser.hpp b/include/chaiscript/language/chaiscript_parser.hpp index 163d2bb3..97cbca2f 100644 --- a/include/chaiscript/language/chaiscript_parser.hpp +++ b/include/chaiscript/language/chaiscript_parser.hpp @@ -995,7 +995,7 @@ namespace chaiscript int in_interpolation = 0; bool in_quote = false; - while (m_position.has_more() && ((*m_position != '\"') || ((*m_position == '\"') && (in_interpolation > 0)) || ((*m_position == '\"') && (prev_char == '\\')))) { + while (m_position.has_more() && ((*m_position != '\"') || (in_interpolation > 0) || (prev_char == '\\'))) { if (!Eol_()) { if (prev_char == '$' && *m_position == '{') { @@ -1281,7 +1281,7 @@ namespace chaiscript char prev_char = *m_position; ++m_position; - while (m_position.has_more() && ((*m_position != '\'') || ((*m_position == '\'') && (prev_char == '\\')))) { + while (m_position.has_more() && ((*m_position != '\'') || (prev_char == '\\'))) { if (!Eol_()) { if (prev_char == '\\') { prev_char = 0;