Fix overly strict shadows in GCC 4.9

Fixes #86. Rename some variables so that the overly strict shadows warning
on GCC 4.9 is not triggered.
This commit is contained in:
Jarryd Beck 2017-11-30 08:22:47 +11:00
parent 2015a7438a
commit 346956eff1
2 changed files with 11 additions and 7 deletions

View File

@ -15,6 +15,10 @@ options. The project adheres to semantic versioning.
* Fixed an ambiguous overload in the `parse_positional` function when an
`initializer_list` was directly passed.
### Bug Fixes
* Building against GCC 4.9 was broken due to overly strict shadow warnings.
## 2.0
### Changed

View File

@ -902,13 +902,13 @@ namespace cxxopts
public:
OptionDetails
(
const std::string& short_name,
const std::string& long_name,
const std::string& short_,
const std::string& long_,
const String& desc,
std::shared_ptr<const Value> val
)
: m_short(short_name)
, m_long(long_name)
: m_short(short_)
, m_long(long_)
, m_desc(desc)
, m_value(val)
, m_count(0)
@ -1038,9 +1038,9 @@ namespace cxxopts
class KeyValue
{
public:
KeyValue(std::string key, std::string value)
: m_key(std::move(key))
, m_value(std::move(value))
KeyValue(std::string key_, std::string value_)
: m_key(std::move(key_))
, m_value(std::move(value_))
{
}