Toponaming: Fix transformed; abstract index element name generation

This commit is contained in:
bgbsww
2024-08-09 22:04:05 -04:00
parent 959fa6b628
commit 5b7e03013e
7 changed files with 107 additions and 32 deletions

View File

@@ -462,18 +462,7 @@ const std::string& StringHasher::getPersistenceFileName() const
void StringHasher::Save(Base::Writer& writer) const
{
size_t count = 0;
if (_hashes->SaveAll) {
count = _hashes->size();
}
else {
count = 0;
for (auto& hasher : _hashes->right) {
if (hasher.second->isMarked() || hasher.second->isPersistent()) {
++count;
}
}
}
std::size_t count = _hashes->SaveAll ? _hashes->size() : this->count();
writer.Stream() << writer.ind() << "<StringHasher saveall=\"" << _hashes->SaveAll
<< "\" threshold=\"" << _hashes->Threshold << "\"";