From 573f472c6d282c69d16d4ed985c7433c75876745 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 5 Sep 2020 18:23:31 +0200 Subject: 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 --- registry/source/regimpl.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'registry/source') 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 #include #include +#include #include #include #include @@ -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)); -- cgit