From 45c5f1129e7945dadd35f1ef155c993a1e77984f Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Tue, 24 May 2016 05:39:54 +0300 Subject: [PATCH] Get rid of type aliasing warning. --- source/Base/Shared.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/Base/Shared.cpp b/source/Base/Shared.cpp index 48c88855..95d053be 100644 --- a/source/Base/Shared.cpp +++ b/source/Base/Shared.cpp @@ -1217,7 +1217,23 @@ Float64 ConvNum< Float64 >::FromStr(CSStr s, Int32 /*base*/) // ------------------------------------------------------------------------------------------------ CSStr ConvNum< bool >::ToStr(bool v) { - reinterpret_cast< Uint64 * >(g_NumBuff)[0] = v ? 1702195828LLU : 435728179558LLU; + if (v) + { + g_NumBuff[0] = 't'; + g_NumBuff[1] = 'r'; + g_NumBuff[2] = 'u'; + g_NumBuff[3] = 'e'; + g_NumBuff[4] = '\0'; + } + else + { + g_NumBuff[0] = 'f'; + g_NumBuff[1] = 'a'; + g_NumBuff[2] = 'l'; + g_NumBuff[3] = 's'; + g_NumBuff[4] = 'e'; + g_NumBuff[5] = '\0'; + } return g_NumBuff; }