diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-27 18:05:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-27 18:05:59 +0400 |
commit | 6aa001f48dc9358a2183b62e03a95b19af2cdca7 (patch) | |
tree | 5e5eece276e3fcb5d351712c00f50fb220420a8b /source/blender/blenlib/BLI_string.h | |
parent | d403537fc45f2518be2e8a19150e240a64c8987c (diff) |
code cleanup: remove redundant NULL checks and avoid writing to the source string.
also rename BLI_replacestr() -> BLI_replacestrN() since it returns an allocated buffer.
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r-- | source/blender/blenlib/BLI_string.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index 02eb0734f8c..4816ac19fce 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -86,7 +86,7 @@ __attribute__((nonnull)) #endif ; -char *BLI_replacestr(char *__restrict str, const char *__restrict oldText, const char *__restrict newText) +char *BLI_replacestrN(const char *__restrict str, const char *__restrict substr_old, const char *__restrict substr_new) #ifdef __GNUC__ __attribute__((warn_unused_result)) __attribute__((nonnull)) |