From 5c09a3194e09e4c1c6a752a8648f50ee342e1157 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 20 Jul 2024 02:54:47 +0200 Subject: fix(Core/Config): Allow `#` outside of comments (#19447) --- src/common/Configuration/Config.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/common/Configuration/Config.cpp') diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index d8665593ca..8dcb65b155 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -144,29 +144,17 @@ namespace // read line error if (!in.good() && !in.eof()) - { throw ConfigException(Acore::StringFormatFmt("> Config::LoadFile: Failure to read line number {} in file '{}'", lineNumber, file)); - } // remove whitespace in line line = Acore::String::Trim(line, in.getloc()); if (line.empty()) - { continue; - } - // comments + // comments and headers if (line[0] == '#' || line[0] == '[') - { continue; - } - - size_t found = line.find_first_of('#'); - if (found != std::string::npos) - { - line = line.substr(0, found); - } auto const equal_pos = line.find('='); @@ -183,9 +171,7 @@ namespace // Skip if 2+ same options in one config file if (IsDuplicateOption(entry)) - { continue; - } // Add to temp container fileConfigs.emplace(entry, value); -- cgit v1.2.3