]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/SGBinding.cxx
Improve pick-callback enabled testing.
[simgear.git] / simgear / structure / SGBinding.cxx
index 28e6f8169d5f4ae2332fb3c2e5a2d4a8d143413b..86420be15c6ad6c7d478dd72b9bc6407fd78745b 100644 (file)
@@ -165,3 +165,18 @@ void clearBindingList(const SGBindingList& aBindings)
     }
 }
 
+bool anyBindingEnabled(const SGBindingList& aBindings)
+{
+    if (aBindings.empty()) {
+        return false;
+    }
+
+    BOOST_FOREACH(SGBinding_ptr b, aBindings) {
+        if (!b->test()) {
+            return false;
+        }
+    }
+
+    return true;
+}
+