From 51a17a7a0fd543a5990d8f2345bf01ac34b4adab Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sat, 7 Jul 2012 16:05:02 +0200 Subject: [PATCH] Suppress unnecessary "failed alias" warnings when requested alias matches existing alias anyway (identical aliases can be created on repeated sim resets) --- simgear/props/props.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simgear/props/props.cxx b/simgear/props/props.cxx index 26a6c85e..d690cbe6 100644 --- a/simgear/props/props.cxx +++ b/simgear/props/props.cxx @@ -797,9 +797,11 @@ SGPropertyNode::alias (SGPropertyNode * target) else if (_type == props::ALIAS) { + if (_value.alias == target) + return true; // ok, identical alias requested SG_LOG(SG_GENERAL, SG_ALERT, "Failed to create alias at " << target->getPath() << ". " - "Source "<< getPath() << " is also an alias. Unsupported recursion."); + "Source "<< getPath() << " is already aliasing another property."); } else if (_tied) -- 2.39.5