From 8772ff4e2a772d0d06bc523c9115345bcc68e4ed Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Thu, 6 Jan 2022 21:59:58 +0000 Subject: [PATCH] simgear/props/props.*: added SGPropertyNode::getValue() specialisation. This is needed for external VR code that used to use SGPropertyNode::getValue() (which has been removed). --- simgear/props/props.cxx | 7 +++++++ simgear/props/props.hxx | 1 + 2 files changed, 8 insertions(+) diff --git a/simgear/props/props.cxx b/simgear/props/props.cxx index f9d1ce40..ea97bf7d 100755 --- a/simgear/props/props.cxx +++ b/simgear/props/props.cxx @@ -4325,6 +4325,7 @@ template int SGPropertyNode::getValue(void*) const; template long SGPropertyNode::getValue(void*) const; template float SGPropertyNode::getValue(void*) const; template double SGPropertyNode::getValue(void*) const; +template std::string SGPropertyNode::getValue(void*) const; template SGVec3 SGPropertyNode::getValue>(void*) const; template SGVec4 SGPropertyNode::getValue>(void*) const; @@ -4358,6 +4359,12 @@ double SGPropertyNode::getValue(SGPropertyLock& lock, void* dummy) const return SGPropertyNodeImpl::getDoubleValue(lock, *this); } +template<> +std::string SGPropertyNode::getValue(SGPropertyLock& lock, void* dummy) const +{ + return SGPropertyNodeImpl::getStringValue(lock, *this); +} + template bool SGPropertyNode::setValue(const bool&, void*); template bool SGPropertyNode::setValue(const int&, void*); template bool SGPropertyNode::setValue(const long&, void*); diff --git a/simgear/props/props.hxx b/simgear/props/props.hxx index 0fcd4106..3a14fb2c 100644 --- a/simgear/props/props.hxx +++ b/simgear/props/props.hxx @@ -171,6 +171,7 @@ DEFINTERNALPROP(float, FLOAT); DEFINTERNALPROP(double, DOUBLE); DEFINTERNALPROP(const char*, STRING); DEFINTERNALPROP(const char[], STRING); +DEFINTERNALPROP(std::string, STRING); #undef DEFINTERNALPROP } // namespace props