From 0a7514c47b9b97e8e9392af5469f2d80ae3dc8de Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 20 Oct 2019 13:03:15 +0100 Subject: [PATCH] =?UTF-8?q?Add=20new=20=E2=80=98listener-safe=E2=80=99=20S?= =?UTF-8?q?GProperty=20attribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Used in FG to make certain tied properties as safe to use with listeners, and hence suppress the warning. --- simgear/props/props.cxx | 2 +- simgear/props/props.hxx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/simgear/props/props.cxx b/simgear/props/props.cxx index 9d941559..c6a84df0 100644 --- a/simgear/props/props.cxx +++ b/simgear/props/props.cxx @@ -849,7 +849,7 @@ SGPropertyNode::trace_read () const * Last used attribute * Update as needed when enum Attribute is changed */ -const int SGPropertyNode::LAST_USED_ATTRIBUTE = PROTECTED; +const int SGPropertyNode::LAST_USED_ATTRIBUTE = LISTENER_SAFE; /** * Default constructor: always creates a root node. diff --git a/simgear/props/props.hxx b/simgear/props/props.hxx index 3afc8796..0d407c99 100644 --- a/simgear/props/props.hxx +++ b/simgear/props/props.hxx @@ -821,6 +821,7 @@ public: USERARCHIVE = 64, PRESERVE = 128, PROTECTED = 1 << 8, + LISTENER_SAFE = 1 << 9, /// it's safe to listen to this property, even if it's tied // beware: if you add another attribute here, // also update value of "LAST_USED_ATTRIBUTE". };