From 51691f7fa17bdf001c5d8f47bd6d18362a8797b9 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 29 Jun 2017 00:15:55 -0700 Subject: [PATCH] fix multiple definitions in src/util/text.h --- src/util/text.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/text.h b/src/util/text.h index 7e9dab5..e68eb49 100644 --- a/src/util/text.h +++ b/src/util/text.h @@ -234,7 +234,7 @@ public: } }; -Encoded_character encode_utf8(char32_t ch, bool use_2_byte_null = false) noexcept +constexpr Encoded_character encode_utf8(char32_t ch, bool use_2_byte_null = false) noexcept { assert(ch < 0x10FFFFUL && ch >= 0); if(use_2_byte_null && ch == 0) @@ -278,7 +278,7 @@ typename std::char_traits::int_type decode_utf16( return unit0; } -Encoded_character encode_utf16(char32_t ch) noexcept +constexpr Encoded_character encode_utf16(char32_t ch) noexcept { assert(ch < 0x10FFFFUL && ch >= 0); if(ch < 0x10000UL) @@ -307,7 +307,7 @@ typename std::char_traits::int_type decode_utf32( return retval; } -Encoded_character encode_utf32(char32_t ch) noexcept +constexpr Encoded_character encode_utf32(char32_t ch) noexcept { return Encoded_character(ch); } @@ -320,7 +320,7 @@ static_assert(std::numeric_limits::digits constexpr bool is_wide_character_utf16 = std::numeric_limits::digits <= 16; -Encoded_character encode_wide(char32_t ch) noexcept +constexpr Encoded_character encode_wide(char32_t ch) noexcept { if(is_wide_character_utf16) { -- 2.30.2