mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 14:58:32 +00:00
StripSpaces: only strip spaces
StripWhitespace maintains old behavior
This commit is contained in:
parent
e4ff49769c
commit
f92541fbd9
20 changed files with 44 additions and 32 deletions
|
@ -25,11 +25,11 @@ void IniFile::ParseLine(std::string_view line, std::string* keyOut, std::string*
|
|||
if (firstEquals != std::string::npos)
|
||||
{
|
||||
// Yes, a valid line!
|
||||
*keyOut = StripSpaces(line.substr(0, firstEquals));
|
||||
*keyOut = StripWhitespace(line.substr(0, firstEquals));
|
||||
|
||||
if (valueOut)
|
||||
{
|
||||
*valueOut = StripQuotes(StripSpaces(line.substr(firstEquals + 1, std::string::npos)));
|
||||
*valueOut = StripQuotes(StripWhitespace(line.substr(firstEquals + 1, std::string::npos)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ bool IniFile::Section::GetLines(std::vector<std::string>* lines, const bool remo
|
|||
{
|
||||
for (const std::string& line : m_lines)
|
||||
{
|
||||
std::string_view stripped_line = StripSpaces(line);
|
||||
std::string_view stripped_line = StripWhitespace(line);
|
||||
|
||||
if (remove_comments)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ bool IniFile::Section::GetLines(std::vector<std::string>* lines, const bool remo
|
|||
|
||||
if (commentPos != std::string::npos)
|
||||
{
|
||||
stripped_line = StripSpaces(stripped_line.substr(0, commentPos));
|
||||
stripped_line = StripWhitespace(stripped_line.substr(0, commentPos));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue