From: Mathias Froehlich Date: Thu, 8 Nov 2012 20:31:16 +0000 (+0100) Subject: hla: Use raw pointers for HLAFederate::_insert methods. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1f585d67199896749f5f532657d17afe586f6615;p=simgear.git hla: Use raw pointers for HLAFederate::_insert methods. --- diff --git a/simgear/hla/HLAFederate.cxx b/simgear/hla/HLAFederate.cxx index d39d8aaa..d52dbcca 100644 --- a/simgear/hla/HLAFederate.cxx +++ b/simgear/hla/HLAFederate.cxx @@ -1129,9 +1129,9 @@ HLAFederate::_clearRTI() } bool -HLAFederate::_insertInteractionClass(const SGSharedPtr& interactionClass) +HLAFederate::_insertInteractionClass(HLAInteractionClass* interactionClass) { - if (!interactionClass.valid()) + if (!interactionClass) return false; if (_interactionClassMap.find(interactionClass->getName()) != _interactionClassMap.end()) { SG_LOG(SG_IO, SG_ALERT, "HLA: _insertInteractionClass: object instance with name \"" @@ -1143,9 +1143,9 @@ HLAFederate::_insertInteractionClass(const SGSharedPtr& int } bool -HLAFederate::_insertObjectClass(const SGSharedPtr& objectClass) +HLAFederate::_insertObjectClass(HLAObjectClass* objectClass) { - if (!objectClass.valid()) + if (!objectClass) return false; if (_objectClassMap.find(objectClass->getName()) != _objectClassMap.end()) { SG_LOG(SG_IO, SG_ALERT, "HLA: _insertObjectClass: object instance with name \"" @@ -1157,9 +1157,9 @@ HLAFederate::_insertObjectClass(const SGSharedPtr& objectClass) } bool -HLAFederate::_insertObjectInstance(const SGSharedPtr& objectInstance) +HLAFederate::_insertObjectInstance(HLAObjectInstance* objectInstance) { - if (!objectInstance.valid()) + if (!objectInstance) return false; if (objectInstance->getName().empty()) { SG_LOG(SG_IO, SG_ALERT, "HLA: _insertObjectInstance: trying to insert object instance with empty name!"); diff --git a/simgear/hla/HLAFederate.hxx b/simgear/hla/HLAFederate.hxx index 4b1d4164..ab5fa57e 100644 --- a/simgear/hla/HLAFederate.hxx +++ b/simgear/hla/HLAFederate.hxx @@ -226,11 +226,11 @@ private: void _clearRTI(); /// Internal helpers for interaction classes - bool _insertInteractionClass(const SGSharedPtr& interactionClass); + bool _insertInteractionClass(HLAInteractionClass* interactionClass); /// Internal helpers for object classes - bool _insertObjectClass(const SGSharedPtr& objectClass); + bool _insertObjectClass(HLAObjectClass* objectClass); /// Internal helpers for object instances - bool _insertObjectInstance(const SGSharedPtr& objectInstance); + bool _insertObjectInstance(HLAObjectInstance* objectInstance); void _eraseObjectInstance(const std::string& name); /// The underlying interface to the rti implementation