Commit 748ac3527752f73b8a59ae85a2170be250a65b2d

Authored by Jarryd Beck
1 parent 703eeef9

small cleanup

Showing 1 changed file with 4 additions and 8 deletions
include/cxxopts.hpp
@@ -1164,8 +1164,8 @@ namespace cxxopts @@ -1164,8 +1164,8 @@ namespace cxxopts
1164 } 1164 }
1165 1165
1166 const std::string* m_long_name = nullptr; 1166 const std::string* m_long_name = nullptr;
1167 - // Holding this pointer is safe, since OptionValue's only exist in key-value pairs,  
1168 - // where the key has the string we point to. 1167 + // Holding this pointer is safe, since OptionValue's only exist in key-value pairs,
  1168 + // where the key has the string we point to.
1169 std::shared_ptr<Value> m_value; 1169 std::shared_ptr<Value> m_value;
1170 size_t m_count = 0; 1170 size_t m_count = 0;
1171 bool m_default = false; 1171 bool m_default = false;
@@ -2000,7 +2000,6 @@ OptionParser::parse(int argc, const char** argv) @@ -2000,7 +2000,6 @@ OptionParser::parse(int argc, const char** argv)
2000 auto& detail = opt.second; 2000 auto& detail = opt.second;
2001 const auto& value = detail->value(); 2001 const auto& value = detail->value();
2002 2002
2003 - //auto& store = m_results[detail];  
2004 auto& store = m_parsed[detail->hash()]; 2003 auto& store = m_parsed[detail->hash()];
2005 2004
2006 if(value.has_default() && !store.count() && !store.has_default()){ 2005 if(value.has_default() && !store.count() && !store.has_default()){
@@ -2039,11 +2038,8 @@ OptionParser::finalise_aliases() @@ -2039,11 +2038,8 @@ OptionParser::finalise_aliases()
2039 { 2038 {
2040 auto& detail = *option.second; 2039 auto& detail = *option.second;
2041 auto hash = detail.hash(); 2040 auto hash = detail.hash();
2042 - //if (m_parsed.find(hash) != m_parsed.end())  
2043 - {  
2044 - m_keys[detail.short_name()] = hash;  
2045 - m_keys[detail.long_name()] = hash;  
2046 - } 2041 + m_keys[detail.short_name()] = hash;
  2042 + m_keys[detail.long_name()] = hash;
2047 2043
2048 m_parsed.emplace(hash, OptionValue()); 2044 m_parsed.emplace(hash, OptionValue());
2049 } 2045 }