summaryrefslogtreecommitdiff
path: root/include/o3tl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-10-29 08:09:50 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-10-29 09:17:55 +0100
commitc8b93a478dc420398b3f70724422a551bb743a70 (patch)
treeff955a41d65f97bfd221f2e931e5b74bf0e69773 /include/o3tl
parent04eacb9ae3573be7419dc92545d31c0c76f3df43 (diff)
Use the underlying type of char16_t
Change-Id: I5f48f1f3dc379cc57cfeac473f80bec4c4bc38af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104989 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/o3tl')
-rw-r--r--include/o3tl/cppunittraitshelper.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/o3tl/cppunittraitshelper.hxx b/include/o3tl/cppunittraitshelper.hxx
index d9f75a61b4c8..2a6fb8836238 100644
--- a/include/o3tl/cppunittraitshelper.hxx
+++ b/include/o3tl/cppunittraitshelper.hxx
@@ -12,6 +12,7 @@
#include <sal/config.h>
+#include <cstdint>
#include <string>
#include <cppunit/TestAssert.h>
@@ -19,7 +20,7 @@
// ostream << char16_t is deleted since C++20 (but just keep outputting numeric values):
template <> inline std::string CppUnit::assertion_traits<char16_t>::toString(char16_t const& x)
{
- return assertion_traits<unsigned>::toString(unsigned(x));
+ return assertion_traits<std::uint_least16_t>::toString(std::uint_least16_t(x));
}
#endif