fixed and MSVC warning about unreachable code

thonsew: You are sure it's a gooc idea to throw such a lot from here ?
Since that line is clearly not the only one which gets
skipped. WRN_NGs are emitted to the console in any case, even in
normal play without debug mode or log domains set.
This commit is contained in:
Anonymissimus 2011-09-14 16:11:06 +00:00
parent 9391bd4dc8
commit 943be2ca8f

View file

@ -761,9 +761,9 @@ void variable_info::init(const config::t_token& varname, bool force_valid) {
case variable_info::TYPE_ARRAY:
case variable_info::TYPE_CONTAINER:
WRN_NG << _("variable_info: using reserved WML variable as wrong type, ") << varname << std::endl;
is_valid_ = force_valid || repos->temporaries_.child(varname);
throw game::wml_syntax_error(tokens, i - tokens.begin()
, _("attempt to get length of a non array/container.") );
is_valid_ = force_valid || repos->temporaries_.child(varname);
break;
case variable_info::TYPE_SCALAR:
default: