From adf419792743a4c79b2054e42618dff75bb552ce Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 7 Jul 2022 13:05:57 +0200 Subject: elide some string copies Change-Id: I3e0d9f7e5a446689e007b9d01fb1c6bf9bc068e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136880 Tested-by: Jenkins Reviewed-by: Noel Grandin --- avmedia/source/framework/mediaitem.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'avmedia') diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index 0a53cf5d4d39..7d249c604b6b 100644 --- a/avmedia/source/framework/mediaitem.cxx +++ b/avmedia/source/framework/mediaitem.cxx @@ -406,13 +406,13 @@ CreateStream(uno::Reference const& xStorage, if (xStorage->hasByName(filename)) { - OUString basename; - OUString suffix; + std::u16string_view basename; + std::u16string_view suffix; sal_Int32 const nIndex(rFilename.lastIndexOf('.')); if (0 < nIndex) { - basename = rFilename.copy(0, nIndex); - suffix = rFilename.copy(nIndex); + basename = rFilename.subView(0, nIndex); + suffix = rFilename.subView(nIndex); } sal_Int32 count(0); // sigh... try to generate non-existent name do -- cgit