mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 03:15:32 +00:00
Improve validate implementation
This commit is contained in:
parent
350f6e61f7
commit
ce0966b9b7
1 changed files with 4 additions and 4 deletions
|
@ -9,11 +9,11 @@ void Fallback::validate(boost::any& v, std::vector<std::string> const& tokens, F
|
|||
|
||||
FallbackMap *map = boost::any_cast<FallbackMap>(&v);
|
||||
|
||||
for (std::vector<std::string>::const_iterator it = tokens.begin(); it != tokens.end(); ++it)
|
||||
for (const auto& token : tokens)
|
||||
{
|
||||
std::string temp = Files::EscapeHashString::processString(*it);
|
||||
int sep = temp.find(",");
|
||||
if (sep < 1 || sep == (int)temp.length() - 1)
|
||||
std::string temp = Files::EscapeHashString::processString(token);
|
||||
size_t sep = temp.find(",");
|
||||
if (sep < 1 || sep == temp.length() - 1)
|
||||
#if (BOOST_VERSION < 104200)
|
||||
throw boost::program_options::validation_error("invalid value");
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue