diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-14 12:50:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-14 17:50:11 +0000 |
commit | 899dfbca1755f730dc935ca0d929236f999b9879 (patch) | |
tree | 1bd455232191f057c088791145f0d1fb8329ce9d /desktop | |
parent | e056c1ce10779b42ae17866913cf4db06b86a491 (diff) |
elide some temporary OStrings
where we can pass a string_view into OStringToOUString
Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/manager/dp_manager.cxx | 2 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 570f8be23330..9c4a849e2843 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -251,7 +251,7 @@ void PackageManagerImpl::initActivationLayer( ucbhelper::Content remFileContent( url + "removed", Reference<XCommandEnvironment>(), m_xComponentContext); std::vector<sal_Int8> data = dp_misc::readFile(remFileContent); - OString osData(reinterpret_cast<const char*>(data.data()), + std::string_view osData(reinterpret_cast<const char*>(data.data()), data.size()); OUString sData = OStringToOUString( osData, RTL_TEXTENCODING_UTF8); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 9722be530db2..1a29cdd4ce05 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -348,7 +348,7 @@ static OUString getUString(const char* pString) if (pString == nullptr) return OUString(); - OString sString(pString, strlen(pString)); + std::string_view sString(pString, strlen(pString)); return OStringToOUString(sString, RTL_TEXTENCODING_UTF8); } |