summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/program_options/errors.hpp')
-rw-r--r--3rdParty/Boost/src/boost/program_options/errors.hpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/3rdParty/Boost/src/boost/program_options/errors.hpp b/3rdParty/Boost/src/boost/program_options/errors.hpp
index addb8d6..f31defb 100644
--- a/3rdParty/Boost/src/boost/program_options/errors.hpp
+++ b/3rdParty/Boost/src/boost/program_options/errors.hpp
@@ -25,7 +25,8 @@ namespace boost { namespace program_options {
inline std::string strip_prefixes(const std::string& text)
{
- return text.substr(text.find_last_of("-/") + 1);
+ // "--foo-bar" -> "foo-bar"
+ return text.substr(text.find_first_not_of("-/"));
}
/** Base class for all errors in the library. */
@@ -104,13 +105,13 @@ namespace boost { namespace program_options {
std::map<std::string, string_pair > m_substitution_defaults;
public:
- /** template with placeholders */
- std::string m_error_template;
+ /** template with placeholders */
+ std::string m_error_template;
- error_with_option_name(const std::string& template_,
- const std::string& option_name = "",
- const std::string& original_token = "",
- int option_style = 0);
+ error_with_option_name(const std::string& template_,
+ const std::string& option_name = "",
+ const std::string& original_token = "",
+ int option_style = 0);
/** gcc says that throw specification on dtor is loosened
* without this line
@@ -250,7 +251,7 @@ namespace boost { namespace program_options {
}
/** Does NOT set option name, because no option name makes sense */
- virtual void set_option_name(const std::string& option_name){}
+ virtual void set_option_name(const std::string&) {}
~error_with_no_option_name() throw() {}
};