diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-07-21 22:42:35 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-07-31 23:24:52 +0200 |
commit | 5d80385fd167e5e88bb0ce959c78568d7d817842 (patch) | |
tree | bd71c541fc226f1b8a6986ba45148762f9e079ca /sal | |
parent | f0b8ad888aff453e1a765611dceb6bc1cf970780 (diff) |
loplugin:stringconstant: Catch some O[U]String::getStr anti-patterns
Change-Id: I36bc86fcffc3c10fe44e60d779c9aa48eeed00f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154749
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/rtl/locale/rtl_locale.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sal/qa/rtl/locale/rtl_locale.cxx b/sal/qa/rtl/locale/rtl_locale.cxx index 27e30db9f9d4..f1b4e12ee4b7 100644 --- a/sal/qa/rtl/locale/rtl_locale.cxx +++ b/sal/qa/rtl/locale/rtl_locale.cxx @@ -30,7 +30,7 @@ namespace rtl_locale // default locale for test purpose static void setDefaultLocale() { - rtl_locale_setDefault(OUString("de").getStr(), OUString("DE").getStr(), /* OUString() */ OUString("hochdeutsch").getStr() ); + rtl_locale_setDefault(u"de", u"DE", /* OUString() */ u"hochdeutsch" ); } class getDefault : public CppUnit::TestFixture @@ -76,7 +76,7 @@ public: // insert your test code here. void setDefault_001() { - rtl_locale_setDefault(OUString("en").getStr(), OUString("US").getStr(), OUString().getStr()); + rtl_locale_setDefault(u"en", u"US", u""); rtl_Locale* pData = rtl_locale_getDefault(); CPPUNIT_ASSERT_MESSAGE("locale must not null", pData != nullptr); @@ -241,8 +241,8 @@ public: // insert your test code here. void equals_001() { - rtl_Locale* pData1 = rtl_locale_register(OUString("en").getStr(), OUString("US").getStr(), OUString().getStr()); - rtl_Locale* pData2 = rtl_locale_register(OUString("en").getStr(), OUString("US").getStr(), OUString().getStr()); + rtl_Locale* pData1 = rtl_locale_register(u"en", u"US", u""); + rtl_Locale* pData2 = rtl_locale_register(u"en", u"US", u""); bool bLocaleAreEqual = (pData1 == pData2); @@ -251,8 +251,8 @@ public: void equals_002() { - rtl_Locale* pData1 = rtl_locale_register(OUString("en").getStr(), OUString("US").getStr(), OUString().getStr()); - rtl_Locale* pData2 = rtl_locale_register(OUString("en").getStr(), OUString("US").getStr(), OUString().getStr()); + rtl_Locale* pData1 = rtl_locale_register(u"en", u"US", u""); + rtl_Locale* pData2 = rtl_locale_register(u"en", u"US", u""); sal_Int32 nEqual = rtl_locale_equals(pData1, pData2); CPPUNIT_ASSERT(nEqual != 0); |