summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-25 18:56:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-25 19:03:28 +0000
commit27b98e9e3b3d21fded40df1912292f381fae4ab0 (patch)
tree79b6e8e64877d32726edc1a397fe6bcb7f0546d6 /sal
parent5607e88d5f2f2eb7a6b0c9c329728589761c3431 (diff)
loplugin:stringadd in registry..sal
after my patch to merge the bufferadd loplugin into stringadd Change-Id: I1658b960d44780f7d9c447246b1178cb70be5e66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149581 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file_url.cxx3
-rw-r--r--sal/rtl/uri.cxx2
2 files changed, 2 insertions, 3 deletions
diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx
index 4b5a16885cb3..c69670d6373a 100644
--- a/sal/osl/unx/file_url.cxx
+++ b/sal/osl/unx/file_url.cxx
@@ -955,8 +955,7 @@ oslFileError osl::detail::convertPathnameToUrl(OString const & pathname, OUStrin
static sal_Unicode const aHex[16]
= { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }; /* '0'--'9', 'A'--'F' */
- buf.append(aHex[c >> 4]);
- buf.append(aHex[c & 15]);
+ buf.append(OUStringChar(aHex[c >> 4]) + OUStringChar(aHex[c & 15]));
--convert;
continue;
}
diff --git a/sal/rtl/uri.cxx b/sal/rtl/uri.cxx
index 3414552615e6..bb53385dbaab 100644
--- a/sal/rtl/uri.cxx
+++ b/sal/rtl/uri.cxx
@@ -143,7 +143,7 @@ sal_uInt32 readUcs4(sal_Unicode const ** pBegin, sal_Unicode const * pEnd,
}
else
{
- OStringBuffer aBuf;
+ OStringBuffer aBuf(16);
aBuf.append(static_cast< char >(nChar));
rtl_TextToUnicodeConverter aConverter
= rtl_createTextToUnicodeConverter(eCharset);