Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
This commit is contained in:
@@ -190,7 +190,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
|
||||
for (pid = pidlist.first; pid; pid = pid->next) {
|
||||
if (pid->cache == cache)
|
||||
pid2 = pid;
|
||||
else if (cache->name[0] != '\0' && strcmp(cache->name, pid->cache->name) == 0) {
|
||||
else if (cache->name[0] != '\0' && STREQ(cache->name, pid->cache->name)) {
|
||||
/*TODO: report "name exists" to user */
|
||||
BLI_strncpy(cache->name, cache->prev_name, sizeof(cache->name));
|
||||
new_name = 0;
|
||||
|
||||
Reference in New Issue
Block a user