Fixed usage of a reference in a commit of mine.

According to a comment by mordante in variable.hpp, std::string& foo =
vcfg["foo"] is unsafe, and silene appears to have always used
config::attribute_value foo = vcfg["foo"] (without reference).
This commit is contained in:
Anonymissimus 2011-10-15 15:52:18 +00:00
parent b6426bc0fd
commit ed3cc61416

View file

@ -814,7 +814,7 @@ WML_HANDLER_FUNCTION(teleport, event_info, cfg)
const unit* pass_check = NULL;
//@deprecated ignore_passability 1.9.10
const config::attribute_value& ignore_passability = cfg["ignore_passability"];
const config::attribute_value ignore_passability = cfg["ignore_passability"];
if (!ignore_passability.blank()) {
WRN_NG << "[teleport]ignore_passability= is deprecated, use check_passability=\n";
if (!ignore_passability.to_bool(false))