Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-01-07 03:38:08 +0300
committerCampbell Barton <campbell@blender.org>2022-01-07 06:16:26 +0300
commit3d3bc748849834ef74563deb603ab43859cffeeb (patch)
treede74ce4722b2cb032c22dbc090a15dd2e172c29b /source/blender/blenlib/BLI_string.h
parentbb69c19f08ac681d4386325e4318ebfbef2e9531 (diff)
Cleanup: remove redundant const qualifiers for POD types
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r--source/blender/blenlib/BLI_string.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index 91cc7b23a5f..a82e97914db 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -89,7 +89,7 @@ char *BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t
*/
char *BLI_strncpy_ensure_pad(char *__restrict dst,
const char *__restrict src,
- const char pad,
+ char pad,
size_t maxncpy) ATTR_NONNULL();
/**
@@ -306,8 +306,7 @@ size_t BLI_str_format_uint64_grouped(char dst[16], uint64_t num) ATTR_NONNULL();
* \param bytes: Number to format.
* \param base_10: Calculate using base 10 (GB, MB, ...) or 2 (GiB, MiB, ...).
*/
-void BLI_str_format_byte_unit(char dst[15], long long int bytes, const bool base_10)
- ATTR_NONNULL();
+void BLI_str_format_byte_unit(char dst[15], long long int bytes, bool base_10) ATTR_NONNULL();
/**
* Format a count to up to 6 places (plus '\0' terminator) string using long number
* names abbreviations. Used to produce a compact representation of large numbers.
@@ -354,9 +353,8 @@ int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESU
* Like strcmp, but will ignore any heading/trailing pad char for comparison.
* So e.g. if pad is '*', '*world' and 'world*' will compare equal.
*/
-int BLI_strcmp_ignore_pad(const char *str1,
- const char *str2,
- const char pad) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+int BLI_strcmp_ignore_pad(const char *str1, const char *str2, char pad) ATTR_WARN_UNUSED_RESULT
+ ATTR_NONNULL();
/**
* Determine the length of a fixed-size string.
@@ -378,7 +376,7 @@ void BLI_str_rstrip(char *str) ATTR_NONNULL();
* \param pad:
* \return The number of zeros stripped.
*/
-int BLI_str_rstrip_float_zero(char *str, const char pad) ATTR_NONNULL();
+int BLI_str_rstrip_float_zero(char *str, char pad) ATTR_NONNULL();
/**
* Return index of a string in a string array.
@@ -390,7 +388,7 @@ int BLI_str_rstrip_float_zero(char *str, const char pad) ATTR_NONNULL();
*/
int BLI_str_index_in_array_n(const char *__restrict str,
const char **__restrict str_array,
- const int str_array_len) ATTR_NONNULL();
+ int str_array_len) ATTR_NONNULL();
/**
* Return index of a string in a string array.
*
@@ -461,14 +459,14 @@ size_t BLI_str_partition_ex(const char *str,
const char delim[],
const char **sep,
const char **suf,
- const bool from_right) ATTR_NONNULL(1, 3, 4, 5);
+ bool from_right) ATTR_NONNULL(1, 3, 4, 5);
-int BLI_string_max_possible_word_count(const int str_len);
+int BLI_string_max_possible_word_count(int str_len);
bool BLI_string_has_word_prefix(const char *haystack, const char *needle, size_t needle_len);
bool BLI_string_all_words_matched(const char *name,
const char *str,
int (*words)[2],
- const int words_len);
+ int words_len);
/**
* Find the ranges needed to split \a str into its individual words.
@@ -482,7 +480,7 @@ bool BLI_string_all_words_matched(const char *name,
*/
int BLI_string_find_split_words(const char *str,
const size_t len,
- const char delim,
+ char delim,
int r_words[][2],
int words_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();