Skip to content

Commit 046501c

Browse files
committed
Fix member hiding warnings.
Fixes #35.
1 parent 4f52423 commit 046501c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/boost/program_options/detail/cmdline.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ namespace boost { namespace program_options { namespace detail {
136136
const std::vector<style_parser>& style_parsers);
137137

138138
// Copies of input.
139-
std::vector<std::string> args;
139+
std::vector<std::string> m_args;
140140
style_t m_style;
141141
bool m_allow_unregistered;
142142

src/cmdline.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ namespace boost { namespace program_options { namespace detail {
103103
void
104104
cmdline::init(const vector<string>& args)
105105
{
106-
this->args = args;
106+
this->m_args = args;
107107
m_style = command_line_style::default_style;
108108
m_desc = 0;
109109
m_positional = 0;
@@ -244,6 +244,7 @@ namespace boost { namespace program_options { namespace detail {
244244
style_parsers.push_back(boost::bind(&cmdline::parse_terminator, this, _1));
245245

246246
vector<option> result;
247+
vector<string>& args = m_args;
247248
while(!args.empty())
248249
{
249250
bool ok = false;

0 commit comments

Comments
 (0)