Cleanup: use the name of the CMake WITH_STRSIZE_DEBUG for the define

Prefer matching names so there is no reason to confuse the identifiers.
This commit is contained in:
Campbell Barton 2023-05-07 13:55:19 +10:00
parent 7f8495c44b
commit 464a40c1a5
3 changed files with 5 additions and 5 deletions

View File

@ -603,7 +603,7 @@ int BLI_string_find_split_words(const char *str,
/* -------------------------------------------------------------------- */
/** \name String Debugging
* \{ */
#ifdef DEBUG_STRSIZE
#ifdef WITH_STRSIZE_DEBUG
# define BLI_string_debug_size(str, str_maxncpy) memset(str, 0xff, sizeof(*(str)) * str_maxncpy)
/**
* Fill `str` with a non-nil value after the trailing nil character,
@ -613,7 +613,7 @@ void BLI_string_debug_size_after_nil(char *str, size_t str_maxncpy);
#else
# define BLI_string_debug_size(str, str_maxncpy) (void)(0 ? ((str) + (str_maxncpy)) : 0)
# define BLI_string_debug_size_after_nil(str, str_maxncpy) BLI_string_debug_size(str, str_maxncpy)
#endif /* !DEBUG_STRSIZE */
#endif /* !WITH_STRSIZE_DEBUG */
/** \} */
#ifdef __cplusplus

View File

@ -1249,7 +1249,7 @@ void BLI_str_format_integer_unit(char dst[BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE
/** \name String Debugging
* \{ */
#ifdef DEBUG_STRSIZE
#ifdef WITH_STRSIZE_DEBUG
void BLI_string_debug_size_after_nil(char *str, size_t str_maxlen)
{
/* Step over the nil, into the character afterwards. */
@ -1259,6 +1259,6 @@ void BLI_string_debug_size_after_nil(char *str, size_t str_maxlen)
}
}
#endif /* DEBUG_STRSIZE */
#endif /* WITH_STRSIZE_DEBUG */
/** \} */

View File

@ -27,7 +27,7 @@ if(HAVE_FEENABLEEXCEPT)
endif()
if(WITH_STRSIZE_DEBUG)
add_definitions(-DDEBUG_STRSIZE)
add_definitions(-DWITH_STRSIZE_DEBUG)
endif()
if(WITH_TBB)