Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/fasto/fastoredis
Browse files Browse the repository at this point in the history
  • Loading branch information
topilski committed Nov 18, 2014
2 parents 1d8ad4c + 5bde20d commit d39d7d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/common/convert2string.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

/**/

#include <vector>

#include "common/types.h"

#include "common/string_piece.h"
Expand Down
6 changes: 3 additions & 3 deletions src/common/lexical_cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ namespace common
}

template <typename cast_to_t, typename cast_from_t>
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;
}

template<typename type_t>
struct variant_defualter
{
template<typename const_t>
explicit variant_defualter(const_t def, typename boost::enable_if<detail::is_same_or_convertible<const_t, type_t> >::type* v=0)
explicit variant_defualter(const_t def, typename boost::enable_if<detail::is_same_or_convertible<const_t, type_t> >::type* v = 0)
: value_(def)
{

Expand Down
2 changes: 2 additions & 0 deletions tests/unit_test_common_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ TEST(string, convertTo)
ASSERT_EQ(ltext, lconvText);
}

#ifdef OS_WIN
TEST(string16, convertTo)
{
const common::char16* text = L"text";
Expand All @@ -31,3 +32,4 @@ TEST(string16, convertTo)
const std::string fstext2 = common::convertFromString16<std::string>(convText2);
ASSERT_EQ(stext2, fstext2);
}
#endif

0 comments on commit d39d7d3

Please sign in to comment.