From 8c84f68dab58b36a4a8a7d51a634cc2192788798 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Wed, 4 Apr 2012 23:51:22 +0200 Subject: [PATCH] fix for older boost versions; unsigned warning --- apps/openmw/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index bc6159e2a..11efc2867 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -71,8 +71,12 @@ void validate(boost::any &v, std::vector const &tokens, FallbackMap for(std::vector::const_iterator it=tokens.begin(); it != tokens.end(); it++) { 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); +#endif /* #if (BOOST_VERSION <= 104200) */ std::string key(it->substr(0,sep)); std::string value(it->substr(sep+1));