Cleanup: rename as_needed -> if_needed
Follow the naming convention used elsewhere in the code.
This commit is contained in:
@@ -59,7 +59,7 @@ int BLI_str_utf8_invalid_substitute(char *str, size_t str_len, const char substi
|
||||
* \note This is intended for situations when the string is expected to be valid,
|
||||
* where copying and substituting values is typically not needed.
|
||||
*/
|
||||
[[nodiscard]] const char *BLI_str_utf8_invalid_substitute_as_needed(
|
||||
[[nodiscard]] const char *BLI_str_utf8_invalid_substitute_if_needed(
|
||||
const char *str, size_t str_len, const char substitute, char *buf, const size_t buf_maxncpy)
|
||||
ATTR_NONNULL(1, 4);
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ int BLI_str_utf8_invalid_substitute(char *str, size_t str_len, const char substi
|
||||
return tot;
|
||||
}
|
||||
|
||||
const char *BLI_str_utf8_invalid_substitute_as_needed(const char *str,
|
||||
const char *BLI_str_utf8_invalid_substitute_if_needed(const char *str,
|
||||
const size_t str_len,
|
||||
const char substitute,
|
||||
char *buf,
|
||||
|
||||
@@ -574,7 +574,7 @@ void WM_window_title(wmWindowManager *wm, wmWindow *win, const char *title)
|
||||
* from the server - exiting immediately. */
|
||||
const char *filepath = (OS_MAC || OS_WINDOWS) ?
|
||||
filepath_as_bytes :
|
||||
BLI_str_utf8_invalid_substitute_as_needed(filepath_as_bytes,
|
||||
BLI_str_utf8_invalid_substitute_if_needed(filepath_as_bytes,
|
||||
strlen(filepath_as_bytes),
|
||||
'?',
|
||||
_filepath_utf8_buf,
|
||||
|
||||
Reference in New Issue
Block a user