INISettingsInterface: Fix scope of variable warning.

Codacy.
This commit is contained in:
lightningterror 2023-04-02 21:49:29 +02:00
parent bd16ed1340
commit 53a8855696
1 changed files with 2 additions and 1 deletions

View File

@ -305,9 +305,10 @@ std::vector<std::pair<std::string, std::string>> INISettingsInterface::GetKeyVal
using KVEntry = std::pair<const char*, Entry>; using KVEntry = std::pair<const char*, Entry>;
std::vector<KVEntry> entries; std::vector<KVEntry> entries;
std::vector<std::pair<std::string, std::string>> output; std::vector<std::pair<std::string, std::string>> output;
std::list<Entry> keys, values; std::list<Entry> keys;
if (m_ini.GetAllKeys(section, keys)) if (m_ini.GetAllKeys(section, keys))
{ {
std::list<Entry> values;
for (Entry& key : keys) for (Entry& key : keys)
{ {
if (!m_ini.GetAllValues(section, key.pItem, values)) // [[unlikely]] if (!m_ini.GetAllValues(section, key.pItem, values)) // [[unlikely]]