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