summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-09-05 18:23:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-09-05 20:20:13 +0200
commit573f472c6d282c69d16d4ed985c7433c75876745 (patch)
tree90550bfc1117932e2b5bf7fc08b3e2061e4e87bf /registry
parent1daeea3a48fe08979139648289e188bb9fc211b3 (diff)
Make printString take any std::u16string_view argument
(This change is a prerequisite for making the OUString ctor taking a raw pointer explicit.) Change-Id: I201c87e47ae83b7c3df39e5abb420d6a80b1d3e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102080 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'registry')
-rw-r--r--registry/source/regimpl.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 583cddd295d1..f0c8162434d4 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -20,8 +20,10 @@
#include "regimpl.hxx"
+#include <cstddef>
#include <memory>
#include <set>
+#include <string_view>
#include <vector>
#include <string.h>
#include <stdio.h>
@@ -52,9 +54,9 @@ using namespace store;
namespace {
-void printString(OUString const & s) {
+void printString(std::u16string_view s) {
printf("\"");
- for (sal_Int32 i = 0; i < s.getLength(); ++i) {
+ for (std::size_t i = 0; i < s.size(); ++i) {
sal_Unicode c = s[i];
if (c == '"' || c == '\\') {
printf("\\%c", static_cast< char >(c));