summaryrefslogtreecommitdiff
path: root/svtools/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-12 11:17:11 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-12 18:17:49 +0200
commitdcea29c283680c8e75e4890f46b1624d0a55846f (patch)
tree1ca0e41d8d00f27d3b8d3dec5d99a6c2e5aebb91 /svtools/inc
parent6056a0e320f0aabbde7adb28c42e00ed72ef2e5b (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 'svtools/inc')
-rw-r--r--svtools/inc/borderline.hrc2
-rw-r--r--svtools/inc/errtxt.hrc2
-rw-r--r--svtools/inc/langtab.hrc2
3 files changed, 3 insertions, 3 deletions
diff --git a/svtools/inc/borderline.hrc b/svtools/inc/borderline.hrc
index cfa4b22b1fa7..1a9539219a8a 100644
--- a/svtools/inc/borderline.hrc
+++ b/svtools/inc/borderline.hrc
@@ -11,7 +11,7 @@
#include <editeng/borderline.hxx>
#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 std::pair<TranslateId, SvxBorderLineStyle> RID_SVXSTR_BORDERLINE[] =
{
diff --git a/svtools/inc/errtxt.hrc b/svtools/inc/errtxt.hrc
index 83bcc18321bb..a70c0b284704 100644
--- a/svtools/inc/errtxt.hrc
+++ b/svtools/inc/errtxt.hrc
@@ -22,7 +22,7 @@
#include <svtools/sfxecode.hxx>
#include <svtools/soerr.hxx>
-#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+#define NC_(Context, String) TranslateId(Context, u8##String)
const ErrMsgCode RID_ERRCTX[] =
{
diff --git a/svtools/inc/langtab.hrc b/svtools/inc/langtab.hrc
index 92b7e954349a..f2d223840229 100644
--- a/svtools/inc/langtab.hrc
+++ b/svtools/inc/langtab.hrc
@@ -22,7 +22,7 @@
#include <i18nlangtag/lang.h>
#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 std::pair<TranslateId, LanguageType> STR_ARR_SVT_LANGUAGE_TABLE[] =
{