Cleanup: Make AttributeStorage method const
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user