mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 15:10:03 +00:00
fix for older boost versions; unsigned warning
This commit is contained in:
parent
5dd65c11ee
commit
8c84f68dab
1 changed files with 5 additions and 1 deletions
|
@ -71,8 +71,12 @@ void validate(boost::any &v, std::vector<std::string> const &tokens, FallbackMap
|
||||||
for(std::vector<std::string>::const_iterator it=tokens.begin(); it != tokens.end(); it++)
|
for(std::vector<std::string>::const_iterator it=tokens.begin(); it != tokens.end(); it++)
|
||||||
{
|
{
|
||||||
int sep = it->find(",");
|
int sep = it->find(",");
|
||||||
if(sep < 1 || sep == (it->length()-1))
|
if(sep < 1 || sep == (int)it->length()-1)
|
||||||
|
#if (BOOST_VERSION <= 104200)
|
||||||
|
throw boost::program_options::validation_error("invalid value");
|
||||||
|
#else
|
||||||
throw boost::program_options::validation_error(boost::program_options::validation_error::invalid_option_value);
|
throw boost::program_options::validation_error(boost::program_options::validation_error::invalid_option_value);
|
||||||
|
#endif /* #if (BOOST_VERSION <= 104200) */
|
||||||
|
|
||||||
std::string key(it->substr(0,sep));
|
std::string key(it->substr(0,sep));
|
||||||
std::string value(it->substr(sep+1));
|
std::string value(it->substr(sep+1));
|
||||||
|
|
Loading…
Reference in a new issue