Cleanup: Make AttributeStorage method const

This commit is contained in:
Hans Goudey
2025-08-19 10:23:13 -04:00
parent fee17f40a2
commit 8b7a0b307b
2 changed files with 2 additions and 2 deletions

View File

@@ -178,7 +178,7 @@ class AttributeStorage : public ::AttributeStorage {
Attribute::DataVariant data);
/** Return a possibly changed version of the input name that is unique within existing names. */
std::string unique_name_calc(StringRef name);
std::string unique_name_calc(StringRef name) const;
/** Change the name of a single existing attribute. */
void rename(StringRef old_name, std::string new_name);

View File

@@ -301,7 +301,7 @@ bool AttributeStorage::remove(const StringRef name)
return this->runtime->attributes.remove_as(name);
}
std::string AttributeStorage::unique_name_calc(const StringRef name)
std::string AttributeStorage::unique_name_calc(const StringRef name) const
{
return BLI_uniquename_cb(
[&](const StringRef check_name) { return this->lookup(check_name) != nullptr; }, '.', name);