diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-10 13:41:35 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-11 09:19:35 +0200 |
commit | f99bee8103ad82dac2e53e114527399c4af5485c (patch) | |
tree | 0708413c61a0a2b7ee8a7e5a7ee633c410d972b6 /vcl | |
parent | a822df6379606ab9f62d6ebb2318d0294d9c959c (diff) |
Delete OUString UTF-16 string literal ctor/assignment op
...that have been made unused by 7ef3d937415185ef66e32dd3043783eddcd03db5
"loplugin:ostr: Rewrite some uses of O[U]String to use ""_ostr/u""_ustr
literals". (And which means we can remove the relevant code from that plugin
again.)
(This also found a handful of remaining uses that had been hard for the plugin
to discover, along the lines of
> std::map<OUString, int> m = {{u"foo", 0}};
being represented by a
> DeclStmt 0xdaca578 <line:103:5, col:50>
> `-VarDecl 0xdac9150 <col:5, col:49> col:29 s11 'std::map<OUString, int>':'std::map<rtl::OUString, int>' cinit destroyed
> `-ExprWithCleanups 0xdaca548 <col:35, col:49> 'std::map<OUString, int>':'std::map<rtl::OUString, int>'
> `-CXXConstructExpr 0xdaca508 <col:35, col:49> 'std::map<OUString, int>':'std::map<rtl::OUString, int>' 'void (initializer_list<value_type>, const std::less<rtl::OUString> &, const allocator_type &)' list std::initializer_list
> |-CXXStdInitializerListExpr 0xdaca480 <col:35, col:49> 'initializer_list<value_type>':'std::initializer_list<std::pair<const rtl::OUString, int>>'
> | `-MaterializeTemporaryExpr 0xdaca468 <col:35, col:49> 'const std::pair<const rtl::OUString, int>[1]' xvalue
> | `-CXXBindTemporaryExpr 0xdaca448 <col:35, col:49> 'const std::pair<const rtl::OUString, int>[1]' (CXXTemporary 0xdaca448)
> | `-InitListExpr 0xdac9df0 <col:35, col:49> 'const std::pair<const rtl::OUString, int>[1]'
> | `-CXXConstructExpr 0xdaca408 <col:36, col:48> 'const std::pair<const rtl::OUString, int>' 'void (const char16_t (&)[4], int &&) noexcept(_S_nothrow_constructible<const char16_t (&)[4], int>())' list
> | |-StringLiteral 0xdac91b8 <col:38> 'const char16_t[4]' lvalue u"foo"
> | `-MaterializeTemporaryExpr 0xdaca3f0 <col:46> 'int' xvalue
> | `-IntegerLiteral 0xdac91d8 <col:46> 'int' 0
> |-CXXDefaultArgExpr 0xdaca498 <<invalid sloc>> 'const std::less<rtl::OUString>':'const std::less<rtl::OUString>' lvalue
> `-CXXDefaultArgExpr 0xdaca4b8 <<invalid sloc>> 'const allocator_type':'const std::allocator<std::pair<const rtl::OUString, int>>' lvalue
Clang AST.)
Change-Id: I496fe9d4d5e1a033cb7b27b4e04b303f8ddbed4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157756
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/lifecycle.cxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/pdfexport/pdfexport.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx index c1a5e5ac940f..eaeed28b9b97 100644 --- a/vcl/qa/cppunit/lifecycle.cxx +++ b/vcl/qa/cppunit/lifecycle.cxx @@ -269,7 +269,7 @@ void LifecycleTest::testLeakage() aObjects.push_back(LeakTestObject::Create<VclVButtonBox>(xVBox)); } - aObjects.push_back(LeakTestObject::Create<Dialog>(xParent, u"PrintProgressDialog", "vcl/ui/printprogressdialog.ui")); + aObjects.push_back(LeakTestObject::Create<Dialog>(xParent, u"PrintProgressDialog"_ustr, "vcl/ui/printprogressdialog.ui")); xParent.clear(); for (auto i = aObjects.rbegin(); i != aObjects.rend(); ++i) diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 9a2990627125..f67deec04ae2 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -5265,7 +5265,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf144222) CPPUNIT_ASSERT(pTextPage); int nPageObjectCount = pPdfPage->getObjectCount(); - const OUString sChar = u"\u4E2D"; + const OUString sChar = u"\u4E2D"_ustr; basegfx::B2DRectangle aRect1, aRect2; int nCount = 0; |