1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-03 05:53:52 +00:00

Fix for warnings in MSVC #157

This commit is contained in:
Henry Fredrick Schreiner 2018-09-03 20:54:16 +02:00 committed by Henry Schreiner
parent f16f3c97f0
commit 0cb3959755

View File

@ -117,7 +117,7 @@ class ConfigINI : public Config {
std::vector<ConfigItem> output; std::vector<ConfigItem> output;
while(getline(input, line)) { while(getline(input, line)) {
std::vector<std::string> items; std::vector<std::string> items_buffer;
detail::trim(line); detail::trim(line);
size_t len = line.length(); size_t len = line.length();
@ -132,10 +132,10 @@ class ConfigINI : public Config {
if(pos != std::string::npos) { if(pos != std::string::npos) {
out.name = detail::trim_copy(line.substr(0, pos)); out.name = detail::trim_copy(line.substr(0, pos));
std::string item = detail::trim_copy(line.substr(pos + 1)); std::string item = detail::trim_copy(line.substr(pos + 1));
items = detail::split_up(item); items_buffer = detail::split_up(item);
} else { } else {
out.name = detail::trim_copy(line); out.name = detail::trim_copy(line);
items = {"ON"}; items_buffer = {"ON"};
} }
if(detail::to_lower(section) != "default") { if(detail::to_lower(section) != "default") {
@ -149,7 +149,7 @@ class ConfigINI : public Config {
out.parents.insert(out.parents.end(), plist.begin(), plist.end()); out.parents.insert(out.parents.end(), plist.begin(), plist.end());
} }
out.inputs.insert(std::end(out.inputs), std::begin(items), std::end(items)); out.inputs.insert(std::end(out.inputs), std::begin(items_buffer), std::end(items_buffer));
} }
} }
return output; return output;