Base/Toponaming: Correct string hasher output

This commit is contained in:
Chris Hennes
2024-04-17 16:40:30 -05:00
parent 60290a2a34
commit b985f6339e
2 changed files with 3 additions and 4 deletions

View File

@@ -507,6 +507,7 @@ void StringHasher::SaveDocFile(Base::Writer& writer) const
void StringHasher::saveStream(std::ostream& stream) const
{
Base::TextOutputStream textStreamWrapper(stream);
boost::io::ios_flags_saver ifs(stream);
stream << std::hex;
@@ -594,8 +595,9 @@ void StringHasher::saveStream(std::ostream& stream) const
}
else {
// Reaching here means the string may contain space and newlines
// We rely on OutputStream (i.e. textStreamWrapper) to save the string.
stream << ' ';
stream << std::dec << d._data.constData() << std::hex;
textStreamWrapper << d._data.constData();
}
}
}

View File

@@ -158,9 +158,6 @@ Data::ElementMapPtr TopoShape::resetElementMap(Data::ElementMapPtr elementMap)
_cache->subLocation.Identity();
_subLocation.Identity();
_parentCache.reset();
if ( ! elementMap->hasher && Hasher ) {
elementMap->hasher = Hasher;
}
}
return Data::ComplexGeoData::resetElementMap(elementMap);
}