summaryrefslogtreecommitdiffstats
path: root/opencl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-11 11:21:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-11 13:55:14 +0100
commit70519a43e0d89a6b5d89859a6851f8c757c6b0c7 (patch)
treebc1f4a6b6510e3bff75e9dc54eb71e2fa6cfc3c8 /opencl
parenttdf#120993 update Add fields icon in colibre (diff)
downloadcore-70519a43e0d89a6b5d89859a6851f8c757c6b0c7.tar.gz
core-70519a43e0d89a6b5d89859a6851f8c757c6b0c7.zip
Replace OUStringBuffer::appendCopy with append(std::u16string_view)
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'opencl')
-rw-r--r--opencl/source/openclconfig.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx
index 7517cf3fecdf..cf067de5aac3 100644
--- a/opencl/source/openclconfig.cxx
+++ b/opencl/source/openclconfig.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <unicode/regex.h>
#include <comphelper/configuration.hxx>
@@ -76,7 +80,7 @@ OUString getToken(const OUString& string, sal_Int32& index)
while ((p = token.indexOf('%', i)) >= 0)
{
if (p > i)
- result.appendCopy(token, i, p - i);
+ result.append(std::u16string_view(token).substr(i, p - i));
if (p < token.getLength() - 2)
{
result.append(OUStringLiteral1(token.copy(p+1, 2).toInt32(16)));
@@ -87,7 +91,7 @@ OUString getToken(const OUString& string, sal_Int32& index)
i = token.getLength();
}
}
- result.appendCopy(token,i);
+ result.append(std::u16string_view(token).substr(i));
return result.makeStringAndClear();
}