Cleanup: correct documentation of BLI_uniquename_cb for dynamic strings
Correct the documentation of the `BLI_uniquename_cb()` variant that was
introduced in 7afa5aaa59 to support
dynamically-allocated strings.
Contrary to the other functions with the same name, this variant does
not actually assign the name. It returns the new name and leaves the
assignment to the caller.
Pull Request: https://projects.blender.org/blender/blender/pulls/139639
This commit is contained in:
@@ -164,12 +164,17 @@ void BLI_uniquename_cb(blender::FunctionRef<bool(blender::StringRefNull)> unique
|
||||
size_t name_maxncpy) ATTR_NONNULL(2, 4);
|
||||
|
||||
/**
|
||||
* Ensures name is unique (according to criteria specified by caller in unique_check callback),
|
||||
* incrementing its numeric suffix as necessary.
|
||||
* Return a name that is unique (according to criteria specified by caller in
|
||||
* unique_check callback), incrementing its numeric suffix as necessary.
|
||||
*
|
||||
* \param unique_check: Return true if name is not unique
|
||||
* \param delim: Delimits numeric suffix in name
|
||||
* \param name: Name to be ensured unique
|
||||
* \param name: Name to be made unique
|
||||
*
|
||||
* \return name that can be assigned by the caller to make it unique.
|
||||
*
|
||||
* \note Contrary to the other functions with the same name, this function does
|
||||
* not directly set the unique name. That is the responsibility of the caller.
|
||||
*/
|
||||
std::string BLI_uniquename_cb(blender::FunctionRef<bool(blender::StringRef)> unique_check,
|
||||
char delim,
|
||||
|
||||
Reference in New Issue
Block a user