diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/blenlib/BLI_string_utils.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/blenlib/BLI_string_utils.h')
-rw-r--r-- | source/blender/blenlib/BLI_string_utils.h | 49 |
1 files changed, 31 insertions, 18 deletions
diff --git a/source/blender/blenlib/BLI_string_utils.h b/source/blender/blenlib/BLI_string_utils.h index cb299db97d5..9740629276d 100644 --- a/source/blender/blenlib/BLI_string_utils.h +++ b/source/blender/blenlib/BLI_string_utils.h @@ -43,32 +43,45 @@ void BLI_string_split_suffix(const char *string, char *r_body, char *r_suf, cons void BLI_string_split_prefix(const char *string, char *r_pre, char *r_body, const size_t str_len); /* Join strings, return newly allocated string. */ -char *BLI_string_join_arrayN( - const char *strings[], uint strings_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); -char *BLI_string_join_array_by_sep_charN( - char sep, const char *strings[], uint strings_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); -char *BLI_string_join_array_by_sep_char_with_tableN( - char sep, char *table[], const char *strings[], uint strings_len) ATTR_NONNULL(); +char *BLI_string_join_arrayN(const char *strings[], uint strings_len) ATTR_WARN_UNUSED_RESULT + ATTR_NONNULL(); +char *BLI_string_join_array_by_sep_charN(char sep, + const char *strings[], + uint strings_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); +char *BLI_string_join_array_by_sep_char_with_tableN(char sep, + char *table[], + const char *strings[], + uint strings_len) ATTR_NONNULL(); /* Take multiple arguments, pass as (array, length). */ #define BLI_string_joinN(...) \ - BLI_string_join_arrayN( \ - ((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) + BLI_string_join_arrayN(((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) #define BLI_string_join_by_sep_charN(sep, ...) \ - BLI_string_join_array_by_sep_charN( \ - sep, ((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) + BLI_string_join_array_by_sep_charN( \ + sep, ((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) #define BLI_string_join_by_sep_char_with_tableN(sep, table, ...) \ - BLI_string_join_array_by_sep_char_with_tableN( \ - sep, table, ((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) + BLI_string_join_array_by_sep_char_with_tableN( \ + sep, table, ((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) -void BLI_string_flip_side_name(char *r_name, const char *from_name, const bool strip_number, const size_t name_len); +void BLI_string_flip_side_name(char *r_name, + const char *from_name, + const bool strip_number, + const size_t name_len); -bool BLI_uniquename_cb( - UniquenameCheckCallback unique_check, void *arg, const char *defname, char delim, char *name, size_t name_len); -bool BLI_uniquename( - struct ListBase *list, void *vlink, const char *defname, char delim, int name_offs, size_t len); +bool BLI_uniquename_cb(UniquenameCheckCallback unique_check, + void *arg, + const char *defname, + char delim, + char *name, + size_t name_len); +bool BLI_uniquename(struct ListBase *list, + void *vlink, + const char *defname, + char delim, + int name_offs, + size_t len); #ifdef __cplusplus } #endif -#endif /* __BLI_STRING_UTILS_H__ */ +#endif /* __BLI_STRING_UTILS_H__ */ |