Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jarro2783/cxxopts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarryd Beck <jarro.2783@gmail.com>2020-10-01 10:26:32 +0300
committerJarryd Beck <jarro.2783@gmail.com>2020-10-01 10:26:32 +0300
commit748ac3527752f73b8a59ae85a2170be250a65b2d (patch)
treeed650aa30b9cd35ec063bae0af31ea95d7d63805
parent703eeef90611e592eb5fc9f0bac2fe3e1aa16614 (diff)
small cleanup
-rw-r--r--include/cxxopts.hpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp
index 60d3cbf..96881d6 100644
--- a/include/cxxopts.hpp
+++ b/include/cxxopts.hpp
@@ -1164,8 +1164,8 @@ namespace cxxopts
}
const std::string* m_long_name = nullptr;
- // Holding this pointer is safe, since OptionValue's only exist in key-value pairs,
- // where the key has the string we point to.
+ // Holding this pointer is safe, since OptionValue's only exist in key-value pairs,
+ // where the key has the string we point to.
std::shared_ptr<Value> m_value;
size_t m_count = 0;
bool m_default = false;
@@ -2000,7 +2000,6 @@ OptionParser::parse(int argc, const char** argv)
auto& detail = opt.second;
const auto& value = detail->value();
- //auto& store = m_results[detail];
auto& store = m_parsed[detail->hash()];
if(value.has_default() && !store.count() && !store.has_default()){
@@ -2039,11 +2038,8 @@ OptionParser::finalise_aliases()
{
auto& detail = *option.second;
auto hash = detail.hash();
- //if (m_parsed.find(hash) != m_parsed.end())
- {
- m_keys[detail.short_name()] = hash;
- m_keys[detail.long_name()] = hash;
- }
+ m_keys[detail.short_name()] = hash;
+ m_keys[detail.long_name()] = hash;
m_parsed.emplace(hash, OptionValue());
}