[Libreoffice-commits] core.git: include/o3tl

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 29 08:18:36 UTC 2020


 include/o3tl/cppunittraitshelper.hxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c8b93a478dc420398b3f70724422a551bb743a70
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Oct 29 08:09:50 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Oct 29 09:17:55 2020 +0100

    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 at redhat.com>

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


More information about the Libreoffice-commits mailing list