diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-12 11:17:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-12 18:17:49 +0200 |
commit | dcea29c283680c8e75e4890f46b1624d0a55846f (patch) | |
tree | 1ca0e41d8d00f27d3b8d3dec5d99a6c2e5aebb91 /extensions | |
parent | 6056a0e320f0aabbde7adb28c42e00ed72ef2e5b (diff) |
Make NC_ constexpr-friendly
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr
paths into a new TranslateId::getId. And demonstrate constexpr'ability by
making the aCategories var in OApplicationIconControl::Fill
(dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more
such cases that could now be made constexpr.)
Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/inc/command.hrc | 2 | ||||
-rw-r--r-- | extensions/inc/showhide.hrc | 2 | ||||
-rw-r--r-- | extensions/inc/stringarrays.hrc | 2 | ||||
-rw-r--r-- | extensions/inc/strings.hrc | 2 | ||||
-rw-r--r-- | extensions/inc/yesno.hrc | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/extensions/inc/command.hrc b/extensions/inc/command.hrc index ca05f1c4e732..fe77e4940847 100644 --- a/extensions/inc/command.hrc +++ b/extensions/inc/command.hrc @@ -22,7 +22,7 @@ #include <unotools/resmgr.hxx> -#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String)) +#define NC_(Context, String) TranslateId(Context, u8##String) namespace { diff --git a/extensions/inc/showhide.hrc b/extensions/inc/showhide.hrc index 226f8b48e8fd..3b5a931419a2 100644 --- a/extensions/inc/showhide.hrc +++ b/extensions/inc/showhide.hrc @@ -22,7 +22,7 @@ #include <unotools/resmgr.hxx> -#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String)) +#define NC_(Context, String) TranslateId(Context, u8##String) namespace { diff --git a/extensions/inc/stringarrays.hrc b/extensions/inc/stringarrays.hrc index e567e28fe7db..6eadf46cc42f 100644 --- a/extensions/inc/stringarrays.hrc +++ b/extensions/inc/stringarrays.hrc @@ -22,7 +22,7 @@ #include <unotools/resmgr.hxx> -#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String)) +#define NC_(Context, String) TranslateId(Context, u8##String) const TranslateId RID_RSC_ENUM_VERTICAL_ALIGN[] = { diff --git a/extensions/inc/strings.hrc b/extensions/inc/strings.hrc index 510afa6d671e..e124f4a635be 100644 --- a/extensions/inc/strings.hrc +++ b/extensions/inc/strings.hrc @@ -22,7 +22,7 @@ #include <unotools/resmgr.hxx> -#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String)) +#define NC_(Context, String) TranslateId(Context, u8##String) #define RID_STR_EDITMASK NC_("RID_STR_EDITMASK", "Edit mask") #define RID_STR_LITERALMASK NC_("RID_STR_LITERALMASK", "Literal mask") diff --git a/extensions/inc/yesno.hrc b/extensions/inc/yesno.hrc index 32792bb81300..d205e604c495 100644 --- a/extensions/inc/yesno.hrc +++ b/extensions/inc/yesno.hrc @@ -22,7 +22,7 @@ #include <unotools/resmgr.hxx> -#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String)) +#define NC_(Context, String) TranslateId(Context, u8##String) namespace { |