Toponaming: Refactor out duplicated code using elementMap()

This commit is contained in:
bgbsww
2024-07-29 15:37:21 -04:00
committed by Chris Hennes
parent 04d44075f2
commit 959fa6b628
3 changed files with 17 additions and 63 deletions

View File

@@ -323,6 +323,15 @@ ElementMapPtr ComplexGeoData::elementMap(bool flush) const
return _elementMap;
}
ElementMapPtr ComplexGeoData::ensureElementMap(bool flush)
{
if (!_elementMap) {
resetElementMap(std::make_shared<Data::ElementMap>());
}
return elementMap(flush);
}
void ComplexGeoData::flushElementMap() const
{}

View File

@@ -469,6 +469,7 @@ protected:
protected:
ElementMapPtr elementMap(bool flush=true) const;
ElementMapPtr ensureElementMap(bool flush=true);
private:
ElementMapPtr _elementMap;