Skip to content

Commit 572a93a

Browse files
committed
Fix -Wshadow warnings. Closes #4015.
Patch from Tatu Kilappa. [SVN r62236]
1 parent e79708e commit 572a93a

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

include/boost/program_options/detail/parsers.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ namespace boost { namespace program_options {
2929
template<class charT>
3030
basic_command_line_parser<charT>::
3131
basic_command_line_parser(const std::vector<
32-
std::basic_string<charT> >& args)
33-
: detail::cmdline(to_internal(args))
32+
std::basic_string<charT> >& xargs)
33+
: detail::cmdline(to_internal(xargs))
3434
{}
3535

3636

@@ -64,9 +64,9 @@ namespace boost { namespace program_options {
6464

6565
template<class charT>
6666
basic_command_line_parser<charT>&
67-
basic_command_line_parser<charT>::style(int style)
67+
basic_command_line_parser<charT>::style(int xstyle)
6868
{
69-
detail::cmdline::style(style);
69+
detail::cmdline::style(xstyle);
7070
return *this;
7171
}
7272

include/boost/program_options/detail/value_semantic.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ namespace boost { namespace program_options {
143143
a validator for class T, we use it even
144144
when parsing vector<T>. */
145145
boost::any a;
146-
std::vector<std::basic_string<charT> > v;
147-
v.push_back(s[i]);
148-
validate(a, v, (T*)0, 0);
146+
std::vector<std::basic_string<charT> > cv;
147+
cv.push_back(s[i]);
148+
validate(a, cv, (T*)0, 0);
149149
tv->push_back(boost::any_cast<T>(a));
150150
}
151151
catch(const bad_lexical_cast& /*e*/) {

include/boost/program_options/errors.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace boost { namespace program_options {
2020
/** Base class for all errors in the library. */
2121
class BOOST_PROGRAM_OPTIONS_DECL error : public std::logic_error {
2222
public:
23-
error(const std::string& what) : std::logic_error(what) {}
23+
error(const std::string& xwhat) : std::logic_error(xwhat) {}
2424
};
2525

2626
class BOOST_PROGRAM_OPTIONS_DECL invalid_syntax : public error {
@@ -78,9 +78,9 @@ namespace boost { namespace program_options {
7878
class BOOST_PROGRAM_OPTIONS_DECL ambiguous_option : public error {
7979
public:
8080
ambiguous_option(const std::string& name,
81-
const std::vector<std::string>& alternatives)
81+
const std::vector<std::string>& xalternatives)
8282
: error(std::string("ambiguous option ").append(name))
83-
, m_alternatives(alternatives)
83+
, m_alternatives(xalternatives)
8484
, m_option_name(name)
8585
{}
8686

include/boost/program_options/option.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ namespace boost { namespace program_options {
2828
, unregistered(false)
2929
, case_insensitive(false)
3030
{}
31-
basic_option(const std::string& string_key,
32-
const std::vector< std::string> &value)
33-
: string_key(string_key)
34-
, value(value)
31+
basic_option(const std::string& xstring_key,
32+
const std::vector< std::string> &xvalue)
33+
: string_key(xstring_key)
34+
, value(xvalue)
3535
, unregistered(false)
3636
, case_insensitive(false)
3737
{}

include/boost/program_options/options_description.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ namespace program_options {
247247
/** Class thrown when duplicate option description is found. */
248248
class BOOST_PROGRAM_OPTIONS_DECL duplicate_option_error : public error {
249249
public:
250-
duplicate_option_error(const std::string& what) : error(what) {}
250+
duplicate_option_error(const std::string& xwhat) : error(xwhat) {}
251251
};
252252
}}
253253

include/boost/program_options/parsers.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ namespace boost { namespace program_options {
3131
template<class charT>
3232
class basic_parsed_options {
3333
public:
34-
explicit basic_parsed_options(const options_description* description)
35-
: description(description) {}
34+
explicit basic_parsed_options(const options_description* xdescription)
35+
: description(xdescription) {}
3636
/** Options found in the source. */
3737
std::vector< basic_option<charT> > options;
3838
/** Options description that was used for parsing.

include/boost/program_options/variables_map.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ namespace boost { namespace program_options {
5353
class BOOST_PROGRAM_OPTIONS_DECL variable_value {
5454
public:
5555
variable_value() : m_defaulted(false) {}
56-
variable_value(const boost::any& v, bool defaulted)
57-
: v(v), m_defaulted(defaulted)
56+
variable_value(const boost::any& xv, bool xdefaulted)
57+
: v(xv), m_defaulted(xdefaulted)
5858
{}
5959

6060
/** If stored value if of type T, returns that value. Otherwise,

0 commit comments

Comments
 (0)