From 5200a73627d13e2997f81b53f61e143e77e328ee Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 29 Apr 2022 11:06:33 +0200 Subject: use more string_view in various found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cpputools/source/unoexe/unoexe.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpputools/source') diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index 31d6d6bdfac2..f8e5aa12d492 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -171,14 +171,14 @@ static Reference< XInterface > loadComponent( Reference< XImplementationLoader > xLoader; - OUString aExt( rLocation.copy( nDot +1 ) ); + std::u16string_view aExt( rLocation.subView( nDot +1 ) ); - if (aExt == "dll" || aExt == "exe" || aExt == "dylib" || aExt == "so") + if (aExt == u"dll" || aExt == u"exe" || aExt == u"dylib" || aExt == u"so") { createInstance( xLoader, xContext, "com.sun.star.loader.SharedLibrary" ); } - else if (aExt == "jar" || aExt == "class") + else if (aExt == u"jar" || aExt == u"class") { createInstance( xLoader, xContext, "com.sun.star.loader.Java" ); -- cgit