Commit 0cb39597551cf7d87f305faaf7669eebf1b2ae37

Authored by Henry Fredrick Schreiner
Committed by Henry Schreiner
1 parent f16f3c97

Fix for warnings in MSVC #157

Showing 1 changed file with 4 additions and 4 deletions
include/CLI/ConfigFwd.hpp
@@ -117,7 +117,7 @@ class ConfigINI : public Config { @@ -117,7 +117,7 @@ class ConfigINI : public Config {
117 std::vector<ConfigItem> output; 117 std::vector<ConfigItem> output;
118 118
119 while(getline(input, line)) { 119 while(getline(input, line)) {
120 - std::vector<std::string> items; 120 + std::vector<std::string> items_buffer;
121 121
122 detail::trim(line); 122 detail::trim(line);
123 size_t len = line.length(); 123 size_t len = line.length();
@@ -132,10 +132,10 @@ class ConfigINI : public Config { @@ -132,10 +132,10 @@ class ConfigINI : public Config {
132 if(pos != std::string::npos) { 132 if(pos != std::string::npos) {
133 out.name = detail::trim_copy(line.substr(0, pos)); 133 out.name = detail::trim_copy(line.substr(0, pos));
134 std::string item = detail::trim_copy(line.substr(pos + 1)); 134 std::string item = detail::trim_copy(line.substr(pos + 1));
135 - items = detail::split_up(item); 135 + items_buffer = detail::split_up(item);
136 } else { 136 } else {
137 out.name = detail::trim_copy(line); 137 out.name = detail::trim_copy(line);
138 - items = {"ON"}; 138 + items_buffer = {"ON"};
139 } 139 }
140 140
141 if(detail::to_lower(section) != "default") { 141 if(detail::to_lower(section) != "default") {
@@ -149,7 +149,7 @@ class ConfigINI : public Config { @@ -149,7 +149,7 @@ class ConfigINI : public Config {
149 out.parents.insert(out.parents.end(), plist.begin(), plist.end()); 149 out.parents.insert(out.parents.end(), plist.begin(), plist.end());
150 } 150 }
151 151
152 - out.inputs.insert(std::end(out.inputs), std::begin(items), std::end(items)); 152 + out.inputs.insert(std::end(out.inputs), std::begin(items_buffer), std::end(items_buffer));
153 } 153 }
154 } 154 }
155 return output; 155 return output;