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