cppu/source/uno/EnvStack.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit cdfd4d6c9a8cebe55a85624aaaff2664f270b247 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Apr 21 13:56:39 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Apr 21 15:29:33 2022 +0200 use more string_view in cppu Change-Id: Id6b33eb39917ce7b805ea4a5d713d5d78aaa93ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133257 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx index 2daf56a21a79..34fea77f46bd 100644 --- a/cppu/source/uno/EnvStack.cxx +++ b/cppu/source/uno/EnvStack.cxx @@ -172,7 +172,7 @@ static int s_getNextEnv(uno_Environment ** ppEnv, uno_Environment * pCurrEnv, un { int res = 0; - OUString nextPurpose; + std::u16string_view nextPurpose; OUString currPurpose; if (pCurrEnv) @@ -186,7 +186,7 @@ static int s_getNextEnv(uno_Environment ** ppEnv, uno_Environment * pCurrEnv, un if (currPurpose.getLength() > intermPurpose.getLength()) { sal_Int32 idx = currPurpose.lastIndexOf(':'); - nextPurpose = currPurpose.copy(0, idx); + nextPurpose = currPurpose.subView(0, idx); res = -1; } @@ -197,14 +197,14 @@ static int s_getNextEnv(uno_Environment ** ppEnv, uno_Environment * pCurrEnv, un nextPurpose = targetPurpose; else - nextPurpose = targetPurpose.copy(0, idx); + nextPurpose = targetPurpose.subView(0, idx); res = 1; } - if (!nextPurpose.isEmpty()) + if (!nextPurpose.empty()) { - OUString next_envDcp = UNO_LB_UNO + nextPurpose; + OUString next_envDcp = OUString::Concat(UNO_LB_UNO) + nextPurpose; uno_getEnvironment(ppEnv, next_envDcp.pData, nullptr); } else