- fbx: change const semantics for PropertyTable's. Lazy parsing of properties no longer affects logical constness.
parent
97e1761ecd
commit
b49cf16bc2
|
@ -120,7 +120,7 @@ std::string PeekPropertyName(const Element& element)
|
||||||
} //! anon
|
} //! anon
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
PropertyTable::PropertyTable(const Element& element, PropertyTable* templateProps)
|
PropertyTable::PropertyTable(const Element& element, const PropertyTable* templateProps)
|
||||||
: element(element)
|
: element(element)
|
||||||
, templateProps(templateProps)
|
, 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);
|
PropertyMap::const_iterator it = props.find(name);
|
||||||
if (it == props.end()) {
|
if (it == props.end()) {
|
||||||
|
|
|
@ -109,12 +109,12 @@ class PropertyTable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
PropertyTable(const Element& element, PropertyTable* templateProps);
|
PropertyTable(const Element& element, const PropertyTable* templateProps);
|
||||||
~PropertyTable();
|
~PropertyTable();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
const Property* Get(const std::string& name);
|
const Property* Get(const std::string& name) const;
|
||||||
|
|
||||||
const Element& GetElement() const {
|
const Element& GetElement() const {
|
||||||
return element;
|
return element;
|
||||||
|
@ -127,8 +127,8 @@ public:
|
||||||
private:
|
private:
|
||||||
|
|
||||||
LazyPropertyMap lazyProps;
|
LazyPropertyMap lazyProps;
|
||||||
PropertyMap props;
|
mutable PropertyMap props;
|
||||||
PropertyTable* const templateProps;
|
const PropertyTable* const templateProps;
|
||||||
const Element& element;
|
const Element& element;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue