From b49cf16bc2c37372ad387382d0cf8bc3b115e8ab Mon Sep 17 00:00:00 2001 From: acgessler Date: Mon, 2 Jul 2012 17:09:32 +0200 Subject: [PATCH] - fbx: change const semantics for PropertyTable's. Lazy parsing of properties no longer affects logical constness. --- code/FBXProperties.cpp | 4 ++-- code/FBXProperties.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/FBXProperties.cpp b/code/FBXProperties.cpp index da637b534..00b0b5b58 100644 --- a/code/FBXProperties.cpp +++ b/code/FBXProperties.cpp @@ -120,7 +120,7 @@ std::string PeekPropertyName(const Element& element) } //! anon // ------------------------------------------------------------------------------------------------ -PropertyTable::PropertyTable(const Element& element, PropertyTable* templateProps) +PropertyTable::PropertyTable(const Element& element, const PropertyTable* templateProps) : element(element) , templateProps(templateProps) { @@ -156,7 +156,7 @@ PropertyTable::~PropertyTable() } // ------------------------------------------------------------------------------------------------ -const Property* PropertyTable::Get(const std::string& name) +const Property* PropertyTable::Get(const std::string& name) const { PropertyMap::const_iterator it = props.find(name); if (it == props.end()) { diff --git a/code/FBXProperties.h b/code/FBXProperties.h index af74c0acd..cdd8af6b7 100644 --- a/code/FBXProperties.h +++ b/code/FBXProperties.h @@ -109,12 +109,12 @@ class PropertyTable { public: - PropertyTable(const Element& element, PropertyTable* templateProps); + PropertyTable(const Element& element, const PropertyTable* templateProps); ~PropertyTable(); public: - const Property* Get(const std::string& name); + const Property* Get(const std::string& name) const; const Element& GetElement() const { return element; @@ -127,8 +127,8 @@ public: private: LazyPropertyMap lazyProps; - PropertyMap props; - PropertyTable* const templateProps; + mutable PropertyMap props; + const PropertyTable* const templateProps; const Element& element; };