Minor adjustments

This commit is contained in:
Vasily Nemkov 2023-03-29 18:37:44 +02:00
parent afc6b66eb3
commit 73430b8d57
2 changed files with 4 additions and 4 deletions

View File

@ -44,6 +44,7 @@ NextState InlineEscapingStateHandler::waitKey(std::string_view file) const
const size_t character_position = p - file.begin(); const size_t character_position = p - file.begin();
if (*p == quoting_character) if (*p == quoting_character)
{ {
// +1 to skip quoting character
return {character_position + 1u, State::READING_QUOTED_KEY}; return {character_position + 1u, State::READING_QUOTED_KEY};
} }
else else
@ -63,7 +64,7 @@ NextState InlineEscapingStateHandler::waitKey(std::string_view file) const
NextState InlineEscapingStateHandler::readKey(std::string_view file, KeyType & key) const NextState InlineEscapingStateHandler::readKey(std::string_view file, KeyType & key) const
{ {
const auto & [key_value_delimiter, quoting_character, pair_delimiters] = extractor_configuration; const auto & [key_value_delimiter, _, pair_delimiters] = extractor_configuration;
key.clear(); key.clear();

View File

@ -53,8 +53,7 @@ NextState NoEscapingStateHandler::waitKey(std::string_view file) const
NextState NoEscapingStateHandler::readKey(std::string_view file, KeyType & key) const NextState NoEscapingStateHandler::readKey(std::string_view file, KeyType & key) const
{ {
const auto & [key_value_delimiter, quoting_character, pair_delimiters] const auto & [key_value_delimiter, _, pair_delimiters] = extractor_configuration;
= extractor_configuration;
key = {}; key = {};
@ -156,7 +155,7 @@ NextState NoEscapingStateHandler::waitValue(std::string_view file) const
NextState NoEscapingStateHandler::readValue(std::string_view file, ValueType & value) const NextState NoEscapingStateHandler::readValue(std::string_view file, ValueType & value) const
{ {
const auto & [key_value_delimiter, quoting_character, pair_delimiters] = extractor_configuration; const auto & [key_value_delimiter, _, pair_delimiters] = extractor_configuration;
value = {}; value = {};