Clean up some tests.
This commit is contained in:
parent
b17ba8b3a7
commit
c102ebb6da
64 changed files with 615 additions and 541 deletions
|
@ -119,17 +119,15 @@ void TomlReader::processLine(const std::string& line)
|
|||
if (in_comment)
|
||||
{
|
||||
mWorkingTable->addComment({ mLastSectionOffset, working_string });
|
||||
}
|
||||
}
|
||||
else if (in_header)
|
||||
{
|
||||
onHeader(working_string);
|
||||
}
|
||||
else if (found_key)
|
||||
{
|
||||
std::locale locale;
|
||||
key_string.erase(std::remove_if(key_string.begin(), key_string.end(), [locale](unsigned char c) {return std::isspace(c, locale); }), key_string.end());
|
||||
working_string.erase(std::remove_if(working_string.begin(), working_string.end(), [locale](unsigned char c) {return std::isspace(c, locale); }), working_string.end());
|
||||
|
||||
key_string.erase(std::remove_if(key_string.begin(), key_string.end(), [](char c) {return std::isspace(c); }), key_string.end());
|
||||
working_string.erase(std::remove_if(working_string.begin(), working_string.end(), [](char c) {return std::isspace(c); }), working_string.end());
|
||||
if (working_string.size()>2 && working_string[0] == '"' && working_string[working_string.size() - 1] == '"')
|
||||
{
|
||||
working_string = working_string.substr(1, working_string.size() - 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue