From ed3cc61416025b17e7f9d13a4003511a5346b287 Mon Sep 17 00:00:00 2001 From: Anonymissimus Date: Sat, 15 Oct 2011 15:52:18 +0000 Subject: [PATCH] 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). --- src/game_events.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game_events.cpp b/src/game_events.cpp index 91feef8a5ec..c73f83c06ec 100644 --- a/src/game_events.cpp +++ b/src/game_events.cpp @@ -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))