summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-11-14 09:58:49 +0100
committerJulien Nabet <serval2412@yahoo.fr>2020-11-14 19:16:12 +0100
commit457d76327a57303124804a201d58b52ba23ccefe (patch)
treeb8d145ca887960c4475d01a56f5a4fb112048e15 /l10ntools
parentdf3e347b30e60e3fbb6f32cbbed67377518e7862 (diff)
loplugin:stringviewparam (l10ntools)
Change-Id: I9102a00e19af87de4f666d1759551be3af311fe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105828 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/inc/helper.hxx4
-rw-r--r--l10ntools/source/helper.cxx6
2 files changed, 10 insertions, 0 deletions
diff --git a/l10ntools/inc/helper.hxx b/l10ntools/inc/helper.hxx
index a6eed4ff59d3..ff81f5792105 100644
--- a/l10ntools/inc/helper.hxx
+++ b/l10ntools/inc/helper.hxx
@@ -28,7 +28,11 @@ OString escapeAll(
const OString& rText, const OString& rUnEscaped, const OString& rEscaped );
/// Unescape all given character in the text
OString unEscapeAll(
+#ifdef DEBUG
const OString& rText, const OString& rEscaped, const OString& rUnEscaped );
+#else
+ const OString& rText, const OString& rEscaped, std::string_view rUnEscaped );
+#endif
/// Convert special characters to XML entity references
OString QuotHTML( const OString &rString );
diff --git a/l10ntools/source/helper.cxx b/l10ntools/source/helper.cxx
index b842755c27f6..22f5cc5df506 100644
--- a/l10ntools/source/helper.cxx
+++ b/l10ntools/source/helper.cxx
@@ -31,9 +31,15 @@ OString escapeAll(
OString unEscapeAll(
+#ifdef DEBUG
const OString& rText, const OString& rEscaped, const OString& rUnEscaped)
+#else
+ const OString& rText, const OString& rEscaped, std::string_view rUnEscaped)
+#endif
{
+#ifdef DEBUG
assert( rEscaped.getLength() == 2*rUnEscaped.getLength() );
+#endif
OStringBuffer sReturn;
const sal_Int32 nLength = rText.getLength();
for ( sal_Int32 nIndex = 0; nIndex < nLength; ++nIndex )