aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-08 19:26:27 +0800
committercrupest <crupest@outlook.com>2022-01-08 19:26:27 +0800
commit41c1593e2aa9dbb2cde5e054ceb7be667dc2a5d1 (patch)
tree8c8b3dacb6af2031883b14d74701de9de32e6f26
parent0c7153db084060034092c1dc24222cae384722ec (diff)
downloadcru-41c1593e2aa9dbb2cde5e054ceb7be667dc2a5d1.tar.gz
cru-41c1593e2aa9dbb2cde5e054ceb7be667dc2a5d1.tar.bz2
cru-41c1593e2aa9dbb2cde5e054ceb7be667dc2a5d1.zip
...
-rw-r--r--src/toml/TomlParser.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/toml/TomlParser.cpp b/src/toml/TomlParser.cpp
index 7f19c711..5a11404e 100644
--- a/src/toml/TomlParser.cpp
+++ b/src/toml/TomlParser.cpp
@@ -37,25 +37,6 @@ void TomlParser::DoParse(TomlDocument& document) {
auto key = line.substr(0, equal_index).Trim();
auto value = line.substr(equal_index + 1).Trim();
- auto remove_quote = [](const String& str) -> String {
- if (str.size() < 2) {
- return str;
- }
-
- if (str.StartWith(u"\"") && str.EndWith(u"\"")) {
- return str.substr(1, str.size() - 2);
- }
-
- if (str.StartWith(u"\'") && str.EndWith(u"\'")) {
- return str.substr(1, str.size() - 2);
- }
-
- return str;
- };
-
- key = remove_quote(key);
- value = remove_quote(value);
-
document.GetSectionOrCreate(current_section_name)->SetValue(key, value);
}
}