summaryrefslogtreecommitdiffstats
path: root/src/tclap/Arg.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tclap/Arg.h')
-rw-r--r--src/tclap/Arg.h36
1 files changed, 9 insertions, 27 deletions
diff --git a/src/tclap/Arg.h b/src/tclap/Arg.h
index a65822b..cd98886 100644
--- a/src/tclap/Arg.h
+++ b/src/tclap/Arg.h
@@ -1,5 +1,3 @@
-// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
-
/******************************************************************************
*
* file: Arg.h
@@ -49,10 +47,10 @@ typedef std::istrstream istringstream;
#endif
#include <tclap/ArgException.h>
-#include <tclap/Visitor.h>
-#include <tclap/CmdLineInterface.h>
#include <tclap/ArgTraits.h>
+#include <tclap/CmdLineInterface.h>
#include <tclap/StandardTraits.h>
+#include <tclap/Visitor.h>
namespace TCLAP
{
@@ -425,21 +423,18 @@ namespace TCLAP
void ExtractValue(T &destVal, const std::string &strVal, ValueLike vl)
{
static_cast<void>(vl); // Avoid warning about unused vl
- std::istringstream is(strVal);
+ istringstream is(strVal);
int valuesRead = 0;
while (is.good())
{
if (is.peek() != EOF)
-#ifdef TCLAP_SETBASE_ZERO
- {
- is >> std::setbase(0) >> destVal;
- }
-#else
{
+#ifdef TCLAP_SETBASE_ZERO
+ is >> std::setbase(0);
+#endif
is >> destVal;
}
-#endif
else
{
break;
@@ -474,10 +469,6 @@ namespace TCLAP
SetString(destVal, strVal);
}
- //////////////////////////////////////////////////////////////////////
- //BEGIN Arg.cpp
- //////////////////////////////////////////////////////////////////////
-
inline Arg::Arg(const std::string &flag, const std::string &name, const std::string &desc,
bool req, bool valreq, Visitor *v) :
_flag(flag), _name(name), _description(desc), _required(req), _requireLabel("required"),
@@ -490,10 +481,8 @@ namespace TCLAP
"Argument flag can only be one character long", toString()));
}
- if (_name != ignoreNameString() &&
- (_flag == Arg::flagStartString() ||
- _flag == Arg::nameStartString() ||
- _flag == " "))
+ if (_name != ignoreNameString() && (_flag == Arg::flagStartString() ||
+ _flag == Arg::nameStartString() || _flag == " "))
{
throw (SpecificationException("Argument flag cannot be either '" + Arg::flagStartString() +
"' or '" + Arg::nameStartString() + "' or a space.", toString()));
@@ -584,9 +573,6 @@ namespace TCLAP
desc = "(" + _requireLabel + ") ";
}
- // if ( _valueRequired )
- // desc += "(value required) ";
-
desc += _description;
return desc;
}
@@ -740,10 +726,6 @@ namespace TCLAP
_xorSet = false;
_alreadySet = false;
}
-
- //////////////////////////////////////////////////////////////////////
- //END Arg.cpp
- //////////////////////////////////////////////////////////////////////
-} //namespace TCLAP
+}
#endif