diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-13 11:44:13 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-13 11:46:51 +0300 |
commit | 67fa545ed06ef9a5afd1da2591fa8cc60ed808fb (patch) | |
tree | 3e8f14aa123276eef48194d7ffa25467b15195f1 /source/blender/blenlib/intern/path_util.c | |
parent | 270bbc89ec2b311ea6d2467304606116fcc38ed1 (diff) |
Make modifier_unique_name return whether modifier was renamed or not
Diffstat (limited to 'source/blender/blenlib/intern/path_util.c')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index fb4c31d5cdf..72739018399 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -290,7 +290,7 @@ static bool uniquename_unique_check(void *arg, const char *name) /** * Ensures that the specified block has a unique name within the containing list, - * incrementing its numeric suffix as necessary. + * incrementing its numeric suffix as necessary. Returns true if name had to be adjusted. * * \param list List containing the block * \param vlink The block to check the name for @@ -299,7 +299,7 @@ static bool uniquename_unique_check(void *arg, const char *name) * \param name_offs Offset of name within block structure * \param name_len Maximum length of name area */ -void BLI_uniquename(ListBase *list, void *vlink, const char *defname, char delim, int name_offs, int name_len) +bool BLI_uniquename(ListBase *list, void *vlink, const char *defname, char delim, int name_offs, int name_len) { struct {ListBase *lb; void *vlink; int name_offs; } data; data.lb = list; @@ -310,9 +310,9 @@ void BLI_uniquename(ListBase *list, void *vlink, const char *defname, char delim /* See if we are given an empty string */ if (ELEM(NULL, vlink, defname)) - return; + return false; - BLI_uniquename_cb(uniquename_unique_check, &data, defname, delim, GIVE_STRADDR(vlink, name_offs), name_len); + return BLI_uniquename_cb(uniquename_unique_check, &data, defname, delim, GIVE_STRADDR(vlink, name_offs), name_len); } static int BLI_path_unc_prefix_len(const char *path); /* defined below in same file */ |