Merge pull request #15734 from bgbsww/bgbsww-toponamingFixTopoShapeToHaveHasher

Toponaming: make sure TopoShapes have Hashers
This commit is contained in:
Chris Hennes
2024-08-05 11:17:46 -05:00
committed by GitHub
4 changed files with 331 additions and 305 deletions

View File

@@ -296,6 +296,16 @@ ComplexGeoData::getElementMappedNames(const IndexedName& element, bool needUnmap
return {std::make_pair(MappedName(element), ElementIDRefs())};
}
ElementMapPtr ComplexGeoData::resetElementMap(ElementMapPtr elementMap)
{
_elementMap.swap(elementMap);
// We expect that if the ComplexGeoData ( TopoShape ) has a hasher, then its elementMap will
// have the same one. Make sure that happens.
if ( _elementMap && ! _elementMap->hasher )
_elementMap->hasher = Hasher;
return elementMap;
}
std::vector<MappedElement> ComplexGeoData::getElementMap() const
{
flushElementMap();

View File

@@ -316,11 +316,7 @@ public:
*
* @return Returns the existing element map.
*/
virtual ElementMapPtr resetElementMap(ElementMapPtr elementMap = ElementMapPtr())
{
_elementMap.swap(elementMap);
return elementMap;
}
virtual ElementMapPtr resetElementMap(ElementMapPtr elementMap = ElementMapPtr());
/// Get the entire element map
std::vector<MappedElement> getElementMap() const;

View File

@@ -1075,7 +1075,6 @@ std::pair<bool,int> Document::addStringHasher(const StringHasherRef & hasher) co
StringHasherRef Document::getStringHasher(int idx) const {
if(idx<0) {
return d->Hasher;
return d->Hasher;
}
StringHasherRef hasher;