From 53e2dcadec4ebe394b7eda93dbeb183aac0c22ff Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sat, 30 Dec 2023 23:12:42 -0500 Subject: [PATCH] Cleanup: Remove unnecessary C default argument macro --- source/blender/blenlib/BLI_utildefines.h | 10 ---------- source/blender/editors/include/UI_interface_c.hh | 8 ++++---- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 5e0ef9a67f6..fbfd61c7344 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -827,16 +827,6 @@ extern bool BLI_memory_is_zero(const void *arr, size_t arr_size); # define ENUM_OPERATORS(_type, _max) #endif -/** - * Utility so function declarations in C headers can use C++ default arguments. The default is then - * available when included in a C++ file, otherwise the argument has to be set explicitly. - */ -#ifdef __cplusplus -# define CPP_ARG_DEFAULT(default_value) = default_value -#else -# define CPP_ARG_DEFAULT(default_value) -#endif - /** \} */ /* -------------------------------------------------------------------- */ diff --git a/source/blender/editors/include/UI_interface_c.hh b/source/blender/editors/include/UI_interface_c.hh index 5d9be3fd873..691aa7bf3dc 100644 --- a/source/blender/editors/include/UI_interface_c.hh +++ b/source/blender/editors/include/UI_interface_c.hh @@ -1406,7 +1406,7 @@ PointerRNA *UI_but_operator_ptr_get(uiBut *but); void UI_but_context_ptr_set(uiBlock *block, uiBut *but, const char *name, const PointerRNA *ptr); const PointerRNA *UI_but_context_ptr_get(const uiBut *but, const char *name, - const StructRNA *type CPP_ARG_DEFAULT(nullptr)); + const StructRNA *type = nullptr); const bContextStore *UI_but_context_get(const uiBut *but); void UI_but_unit_type_set(uiBut *but, int unit_type); @@ -1864,9 +1864,9 @@ PointerRNA *UI_but_extra_operator_icon_opptr_get(uiButExtraOpIcon *extra_icon); * Get the scaled size for a preview button (typically #UI_BTyPE_PREVIEW_TILE) based on \a * size_px plus padding. */ -int UI_preview_tile_size_x(const int size_px CPP_ARG_DEFAULT(96)); -int UI_preview_tile_size_y(const int size_px CPP_ARG_DEFAULT(96)); -int UI_preview_tile_size_y_no_label(const int size_px CPP_ARG_DEFAULT(96)); +int UI_preview_tile_size_x(const int size_px = 96); +int UI_preview_tile_size_y(const int size_px = 96); +int UI_preview_tile_size_y_no_label(const int size_px = 96); /* Autocomplete *