diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-15 09:39:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-15 13:54:53 +0200 |
commit | 46ce0d28b4c765076c7871358375c4e85e44534b (patch) | |
tree | b17378d5258a51185001eac455a764897e6dda11 /svx | |
parent | 00f7309fb786efcc0bbca04fb29de80f275a16ba (diff) |
loplugin:stringliteralvar look for assignments
to O[U]String from char array literals, we can convert the char literals
to O[U]StringLiteral and avoid a runtime allocation
Change-Id: I15d8dddb2cd428b90740e39f20daf98e0941aa6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/rubydialog.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 4302d4f6b41d..439b4fbab178 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -57,11 +57,11 @@ SFX_IMPL_CHILDWINDOW(SvxRubyChildWindow, SID_RUBY_DIALOG); namespace { -const char cRubyBaseText[] = "RubyBaseText"; -const char cRubyText[] = "RubyText"; -const char cRubyAdjust[] = "RubyAdjust"; -const char cRubyPosition[] = "RubyPosition"; -const char cRubyCharStyleName[] = "RubyCharStyleName"; +constexpr OUStringLiteral cRubyBaseText = u"RubyBaseText"; +constexpr OUStringLiteral cRubyText = u"RubyText"; +constexpr OUStringLiteral cRubyAdjust = u"RubyAdjust"; +constexpr OUStringLiteral cRubyPosition = u"RubyPosition"; +constexpr OUStringLiteral cRubyCharStyleName = u"RubyCharStyleName"; } // end anonymous namespace |