From 5bde20d39629780bef8a7d8fe30ffab4228f338c Mon Sep 17 00:00:00 2001 From: topilski Date: Mon, 17 Nov 2014 09:24:03 +0300 Subject: [PATCH] Fix MacOS build --- src/common/convert2string.h | 2 ++ src/common/lexical_cast.h | 6 +++--- tests/unit_test_common_strings.cpp | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/convert2string.h b/src/common/convert2string.h index 8bd8002..bd58979 100644 --- a/src/common/convert2string.h +++ b/src/common/convert2string.h @@ -2,6 +2,8 @@ /**/ +#include + #include "common/types.h" #include "common/string_piece.h" diff --git a/src/common/lexical_cast.h b/src/common/lexical_cast.h index c0e6d79..92f9877 100644 --- a/src/common/lexical_cast.h +++ b/src/common/lexical_cast.h @@ -18,10 +18,10 @@ namespace common } template - inline cast_to_t union_cast( cast_from_t _value ) + inline cast_to_t union_cast(cast_from_t value) { union Union{ cast_from_t _from; cast_to_t _to; } unionCast; - unionCast._from = _value; + unionCast._from = value; return unionCast._to; } @@ -29,7 +29,7 @@ namespace common struct variant_defualter { template - explicit variant_defualter(const_t def, typename boost::enable_if >::type* v=0) + explicit variant_defualter(const_t def, typename boost::enable_if >::type* v = 0) : value_(def) { diff --git a/tests/unit_test_common_strings.cpp b/tests/unit_test_common_strings.cpp index 8cbf9b6..f0fbdc6 100644 --- a/tests/unit_test_common_strings.cpp +++ b/tests/unit_test_common_strings.cpp @@ -15,6 +15,7 @@ TEST(string, convertTo) ASSERT_EQ(ltext, lconvText); } +#ifdef OS_WIN TEST(string16, convertTo) { const common::char16* text = L"text"; @@ -31,3 +32,4 @@ TEST(string16, convertTo) const std::string fstext2 = common::convertFromString16(convText2); ASSERT_EQ(stext2, fstext2); } +#endif