]> git.mxchange.org Git - simgear.git/blobdiff - simgear/props/props.cxx
Suppress unnecessary "failed alias" warnings
[simgear.git] / simgear / props / props.cxx
index 3aeaaf17598ce8c1221db18855c6dbdcbb84968c..d690cbe66a55f00d246b863b742c3ccf2a9dad6c 100644 (file)
@@ -28,8 +28,6 @@
 #include <boost/functional/hash.hpp>
 #include <boost/range.hpp>
 
-#include <simgear/math/SGMath.hxx>
-
 #if PROPS_STANDALONE
 #include <iostream>
 #else
@@ -799,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)