fix compilation

msvc liked the previous code but travis said:
usr/include/boost/optional/optional.hpp:526:5: candidate constructor not
      viable: no known conversion from 'const config::attribute_value::yes_no'
      to 'argument_type' (aka 'const bool &') for 1st argument.
    optional ( argument_type val ) : base(val) {}
I hope travis likes this version.
This commit is contained in:
gfgtdf 2015-02-12 00:36:33 +01:00
parent 89c461c1c6
commit c0c6f71725

View file

@ -1432,9 +1432,9 @@ namespace {
{ return result_type(); }
//Cannot use bool, the case above would catch the yes_no and true_false values.
result_type operator()(const config::attribute_value::yes_no & b) const
{ return b; }
{ return static_cast<bool>(b); }
result_type operator()(const config::attribute_value::true_false & b) const
{ return b; }
{ return static_cast<bool>(b); }
};
}
int game_lua_kernel::intf_end_level(lua_State *L)