mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-08 03:40:21 -04:00
changed enum names because of alpha conflicts
This commit is contained in:
parent
cf64287c40
commit
a7e9dcdc20
@ -41,7 +41,7 @@ template<class T> class MultiArg;
|
||||
|
||||
namespace MULTI_ARG_HELPER {
|
||||
|
||||
enum Error_e { EFAIL = 1000, EMANY };
|
||||
enum Error_e { EXTRACT_FAILURE = 1000, EXTRACT_TOO_MANY };
|
||||
|
||||
/**
|
||||
* This class is used to extract a value from an argument.
|
||||
@ -105,10 +105,10 @@ class ValueExtractor
|
||||
}
|
||||
|
||||
if ( is.fail() )
|
||||
return EFAIL;
|
||||
return EXTRACT_FAILURE;
|
||||
|
||||
if ( valuesRead > 1 )
|
||||
return EMANY;
|
||||
return EXTRACT_TOO_MANY;
|
||||
|
||||
_values.push_back(temp);
|
||||
|
||||
@ -538,11 +538,11 @@ void MultiArg<T>::_extractValue( const std::string& val )
|
||||
|
||||
int err = ve.extractValue(val);
|
||||
|
||||
if ( err == MULTI_ARG_HELPER::EFAIL )
|
||||
if ( err == MULTI_ARG_HELPER::EXTRACT_FAILURE )
|
||||
throw( ArgParseException("Couldn't read argument value "
|
||||
"from string '" + val + "'", toString() ) );
|
||||
|
||||
if(err == MULTI_ARG_HELPER::EMANY)
|
||||
if(err == MULTI_ARG_HELPER::EXTRACT_TOO_MANY)
|
||||
throw( ArgParseException("More than one valid value "
|
||||
"parsed from string '" + val + "'",
|
||||
toString() ) );
|
||||
|
@ -41,7 +41,7 @@ template<class T> class ValueArg;
|
||||
|
||||
namespace VALUE_ARG_HELPER {
|
||||
|
||||
enum Error_e { EFAIL = 1000, EMANY };
|
||||
enum Error_e { EXTRACT_FAILURE = 1000, EXTRACT_TOO_MANY };
|
||||
|
||||
/**
|
||||
* This class is used to extract a value from an argument.
|
||||
@ -105,10 +105,10 @@ template<class T> class ValueExtractor
|
||||
}
|
||||
|
||||
if ( is.fail() )
|
||||
return EFAIL;
|
||||
return EXTRACT_FAILURE;
|
||||
|
||||
if ( valuesRead > 1 )
|
||||
return EMANY;
|
||||
return EXTRACT_TOO_MANY;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -556,11 +556,11 @@ void ValueArg<T>::_extractValue( const std::string& val )
|
||||
|
||||
int err = ve.extractValue(val);
|
||||
|
||||
if ( err == VALUE_ARG_HELPER::EFAIL )
|
||||
if ( err == VALUE_ARG_HELPER::EXTRACT_FAILURE )
|
||||
throw( ArgParseException("Couldn't read argument value from string '" +
|
||||
val + "'", toString() ) );
|
||||
|
||||
if ( err == VALUE_ARG_HELPER::EMANY )
|
||||
if ( err == VALUE_ARG_HELPER::EXTRACT_TOO_MANY )
|
||||
throw( ArgParseException(
|
||||
"More than one valid value parsed from string '" +
|
||||
val + "'", toString() ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user