bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.hxx | 4 ++-- bridges/source/cpp_uno/gcc3_linux_riscv64/share.hxx | 4 ++-- bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx | 2 +- vcl/source/window/menu.cxx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 3e706aa31d7d1a521710dfa544316e5d35bdf5f0 Author: Akshay Kumar Dubey <[email protected]> AuthorDate: Wed Jan 15 00:42:25 2025 +0530 Commit: Stephan Bergmann <[email protected]> CommitDate: Tue Jan 21 08:56:00 2025 +0100 tdf#145614 Convert #define to constexpr Change-Id: I0bdbb662b807c6ffc9030c4c695e5022949e172f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180254 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.hxx b/bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.hxx index 1fe9e9b58866..c5cd03558cc7 100644 --- a/bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.hxx @@ -21,8 +21,8 @@ #include <typelib/typedescription.hxx> -#define MAX_GP_REGS 8 -#define MAX_FP_REGS 8 +constexpr auto MAX_GP_REGS = 8; +constexpr auto MAX_FP_REGS = 8; namespace loongarch64 { diff --git a/bridges/source/cpp_uno/gcc3_linux_riscv64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_riscv64/share.hxx index 331ed789e39f..d04d4030bc98 100644 --- a/bridges/source/cpp_uno/gcc3_linux_riscv64/share.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_riscv64/share.hxx @@ -24,8 +24,8 @@ #include <exception> #include <cstddef> -#define MAX_GP_REGS (8) -#define MAX_FP_REGS (8) +constexpr auto MAX_GP_REGS = 8; +constexpr auto MAX_FP_REGS = 8; namespace CPPU_CURRENT_NAMESPACE { diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx index 8f6ca30957ed..7e7f456d9c2d 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx @@ -81,7 +81,7 @@ enum x86_64_reg_class } -#define MAX_CLASSES 4 +constexpr auto MAX_CLASSES = 4; /* x86-64 register passing implementation. See x86-64 ABI for details. Goal of this code is to classify each 8bytes of incoming argument by the register diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 75936aed46ca..bdb5bba774fa 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -77,8 +77,8 @@ struct MenuLayoutData : public ControlLayoutData using namespace vcl; -#define EXTRAITEMHEIGHT 4 -#define SPACE_AROUND_TITLE 4 +constexpr auto EXTRAITEMHEIGHT = 4; +constexpr auto SPACE_AROUND_TITLE = 4; static bool ImplAccelDisabled() {
