include/o3tl/cppunittraitshelper.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit c8b93a478dc420398b3f70724422a551bb743a70 Author: Stephan Bergmann <[email protected]> AuthorDate: Thu Oct 29 08:09:50 2020 +0100 Commit: Stephan Bergmann <[email protected]> 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 <[email protected]> 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 _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
