2
0
mirror of https://github.com/boostorg/json.git synced 2026-02-11 11:52:17 +00:00

coverage odds and ends

This commit is contained in:
Vinnie Falco
2019-10-21 15:18:10 -07:00
parent fca1c57c14
commit cb34821834
3 changed files with 7 additions and 7 deletions

View File

@@ -11,6 +11,7 @@
#define BOOST_JSON_IMPL_STORAGE_IPP
#include <boost/json/storage.hpp>
#include <boost/assert.hpp>
#include <memory>
namespace boost {
@@ -49,11 +50,9 @@ global_storage() noexcept
is_equal(storage const& other)
const noexcept override
{
auto p = dynamic_cast<
builtin const*>(&other);
if(! p)
return false;
return true;
BOOST_ASSERT(dynamic_cast<
builtin const*>(&other) == nullptr);
return false;
}
};
static storage_ptr const sp =

View File

@@ -84,7 +84,7 @@ public:
storage const& lhs,
storage const& rhs) noexcept
{
return !(lhs == rhs);
return &lhs != &rhs && ! lhs.is_equal(rhs);
}
};