Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58185 - trunk/libs/program_options/src
From: s.ochsenknecht_at_[hidden]
Date: 2009-12-06 04:56:55


Author: s_ochsenknecht
Date: 2009-12-06 04:56:54 EST (Sun, 06 Dec 2009)
New Revision: 58185
URL: http://svn.boost.org/trac/boost/changeset/58185

Log:
consistent handling of namespace std
Text files modified:
   trunk/libs/program_options/src/cmdline.cpp | 48 ++++++++++++++++++++--------------------
   1 files changed, 24 insertions(+), 24 deletions(-)

Modified: trunk/libs/program_options/src/cmdline.cpp
==============================================================================
--- trunk/libs/program_options/src/cmdline.cpp (original)
+++ trunk/libs/program_options/src/cmdline.cpp 2009-12-06 04:56:54 EST (Sun, 06 Dec 2009)
@@ -35,17 +35,17 @@
     using namespace boost::program_options::command_line_style;
     
     invalid_syntax::
- invalid_syntax(const std::string& tokens, kind_t kind)
+ invalid_syntax(const string& tokens, kind_t kind)
      : error(error_message(kind).append(" in '").append(tokens).append("'"))
      , m_tokens(tokens)
      , m_kind(kind)
     {}
     
- std::string
+ string
     invalid_syntax::error_message(kind_t kind)
     {
         // Initially, store the message in 'const char*' variable,
- // to avoid conversion to std::string in all cases.
+ // to avoid conversion to string in all cases.
         const char* msg;
         switch(kind)
         {
@@ -89,7 +89,7 @@
     }
 
     invalid_command_line_syntax::
- invalid_command_line_syntax(const std::string& tokens, kind_t kind)
+ invalid_command_line_syntax(const string& tokens, kind_t kind)
     : invalid_syntax(tokens, kind)
     {}
 
@@ -105,7 +105,7 @@
 #endif
 
 
- cmdline::cmdline(const std::vector<std::string>& args)
+ cmdline::cmdline(const vector<string>& args)
     {
         init(args);
     }
@@ -122,7 +122,7 @@
     }
 
     void
- cmdline::init(const std::vector<std::string>& args)
+ cmdline::init(const vector<string>& args)
     {
         this->args = args;
         m_style = command_line_style::default_style;
@@ -445,11 +445,11 @@
         }
     }
 
- std::vector<option>
- cmdline::parse_long_option(std::vector<string>& args)
+ vector<option>
+ cmdline::parse_long_option(vector<string>& args)
     {
         vector<option> result;
- const std::string& tok = args[0];
+ const string& tok = args[0];
         if (tok.size() >= 3 && tok[0] == '-' && tok[1] == '-')
         {
             string name, adjacent;
@@ -479,10 +479,10 @@
     }
 
 
- std::vector<option>
- cmdline::parse_short_option(std::vector<string>& args)
+ vector<option>
+ cmdline::parse_short_option(vector<string>& args)
     {
- const std::string& tok = args[0];
+ const string& tok = args[0];
         if (tok.size() >= 2 && tok[0] == '-' && tok[1] != '-')
         {
             vector<option> result;
@@ -530,14 +530,14 @@
             }
             return result;
         }
- return std::vector<option>();
+ return vector<option>();
     }
 
- std::vector<option>
- cmdline::parse_dos_option(std::vector<string>& args)
+ vector<option>
+ cmdline::parse_dos_option(vector<string>& args)
     {
         vector<option> result;
- const std::string& tok = args[0];
+ const string& tok = args[0];
         if (tok.size() >= 2 && tok[0] == '/')
         {
             string name = "-" + tok.substr(1,1);
@@ -554,10 +554,10 @@
         return result;
     }
 
- std::vector<option>
- cmdline::parse_disguised_long_option(std::vector<string>& args)
+ vector<option>
+ cmdline::parse_disguised_long_option(vector<string>& args)
     {
- const std::string& tok = args[0];
+ const string& tok = args[0];
         if (tok.size() >= 2 &&
             ((tok[0] == '-' && tok[1] != '-') ||
              ((m_style & allow_slash_for_short) && tok[0] == '/')))
@@ -574,11 +574,11 @@
         return vector<option>();
     }
 
- std::vector<option>
- cmdline::parse_terminator(std::vector<std::string>& args)
+ vector<option>
+ cmdline::parse_terminator(vector<string>& args)
     {
         vector<option> result;
- const std::string& tok = args[0];
+ const string& tok = args[0];
         if (tok == "--")
         {
             for(unsigned i = 1; i < args.size(); ++i)
@@ -594,8 +594,8 @@
         return result;
     }
 
- std::vector<option>
- cmdline::handle_additional_parser(std::vector<std::string>& args)
+ vector<option>
+ cmdline::handle_additional_parser(vector<string>& args)
     {
         vector<option> result;
         pair<string, string> r = m_additional_parser(args[0]);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk