Skip to content

Commit

Permalink
Silence clang warning
Browse files Browse the repository at this point in the history
  • Loading branch information
awangk committed Oct 27, 2016
1 parent 5e977f6 commit 2b17263
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ujson/ujson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,13 @@ inline void swap(value &lhs, value &rhs) noexcept { lhs.swap(rhs); }

inline bool operator==(const value &lhs, const value &rhs) {

if (typeid(*lhs.impl()) != typeid(*rhs.impl()))
auto lhs_impl = lhs.impl();
auto rhs_impl = rhs.impl();

if (typeid(*lhs_impl) != typeid(*rhs_impl))
return false;

return lhs.impl()->equals(rhs.impl());
return lhs_impl->equals(rhs_impl);
}

inline bool operator!=(const value &lhs, const value &rhs) {
Expand Down

0 comments on commit 2b17263

Please sign in to comment.