diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-27 12:00:47 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-27 12:00:47 +0300 |
commit | e170d6be7fb3f7853fac6e8b2bf0142347a5dcf9 (patch) | |
tree | 9742b42055d7c1865334bb5d47902daba7175fa7 /source/blender/blenlib/intern/string.c | |
parent | ecb6a6df52a9f3852c9bec12e63b4ab8b06fe5f4 (diff) |
Cleanup: all params of BLI_str partition funcs can be const...
Diffstat (limited to 'source/blender/blenlib/intern/string.c')
-rw-r--r-- | source/blender/blenlib/intern/string.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index 0dcb84c9c6e..3177bc659b2 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -854,7 +854,7 @@ bool BLI_str_endswith(const char *__restrict str, const char *end) * \param suf Return value, set to next char after the first delimiter found (or NULL if none found). * \return The length of the prefix (i.e. *sep - str). */ -size_t BLI_str_partition(const char *str, const char delim[], char **sep, char **suf) +size_t BLI_str_partition(const char *str, const char delim[], const char **sep, const char **suf) { return BLI_str_partition_ex(str, NULL, delim, sep, suf, false); } @@ -868,7 +868,7 @@ size_t BLI_str_partition(const char *str, const char delim[], char **sep, char * * \param suf Return value, set to next char after the first delimiter found (or NULL if none found). * \return The length of the prefix (i.e. *sep - str). */ -size_t BLI_str_rpartition(const char *str, const char delim[], char **sep, char **suf) +size_t BLI_str_rpartition(const char *str, const char delim[], const char **sep, const char **suf) { return BLI_str_partition_ex(str, NULL, delim, sep, suf, true); } @@ -885,7 +885,7 @@ size_t BLI_str_rpartition(const char *str, const char delim[], char **sep, char * \return The length of the prefix (i.e. *sep - str). */ size_t BLI_str_partition_ex( - const char *str, const char *end, const char delim[], char **sep, char **suf, const bool from_right) + const char *str, const char *end, const char delim[], const char **sep, const char **suf, const bool from_right) { const char *d; char *(*func)(const char *str, int c) = from_right ? strrchr : strchr; @@ -916,7 +916,7 @@ size_t BLI_str_partition_ex( } if (tmp && (from_right ? (*sep < tmp) : (!*sep || *sep > tmp))) { - *sep = (char *)tmp; + *sep = tmp; } } |