🚨 fix MSVC warning #1502

parent cabe2357
...@@ -249,16 +249,16 @@ class json_sax_dom_parser ...@@ -249,16 +249,16 @@ class json_sax_dom_parser
switch ((ex.id / 100) % 100) switch ((ex.id / 100) % 100)
{ {
case 1: case 1:
JSON_THROW(*reinterpret_cast<const detail::parse_error*>(&ex)); JSON_THROW(*static_cast<const detail::parse_error*>(&ex));
case 4: case 4:
JSON_THROW(*reinterpret_cast<const detail::out_of_range*>(&ex)); JSON_THROW(*static_cast<const detail::out_of_range*>(&ex));
// LCOV_EXCL_START // LCOV_EXCL_START
case 2: case 2:
JSON_THROW(*reinterpret_cast<const detail::invalid_iterator*>(&ex)); JSON_THROW(*static_cast<const detail::invalid_iterator*>(&ex));
case 3: case 3:
JSON_THROW(*reinterpret_cast<const detail::type_error*>(&ex)); JSON_THROW(*static_cast<const detail::type_error*>(&ex));
case 5: case 5:
JSON_THROW(*reinterpret_cast<const detail::other_error*>(&ex)); JSON_THROW(*static_cast<const detail::other_error*>(&ex));
default: default:
assert(false); assert(false);
// LCOV_EXCL_STOP // LCOV_EXCL_STOP
...@@ -506,16 +506,16 @@ class json_sax_dom_callback_parser ...@@ -506,16 +506,16 @@ class json_sax_dom_callback_parser
switch ((ex.id / 100) % 100) switch ((ex.id / 100) % 100)
{ {
case 1: case 1:
JSON_THROW(*reinterpret_cast<const detail::parse_error*>(&ex)); JSON_THROW(*static_cast<const detail::parse_error*>(&ex));
case 4: case 4:
JSON_THROW(*reinterpret_cast<const detail::out_of_range*>(&ex)); JSON_THROW(*static_cast<const detail::out_of_range*>(&ex));
// LCOV_EXCL_START // LCOV_EXCL_START
case 2: case 2:
JSON_THROW(*reinterpret_cast<const detail::invalid_iterator*>(&ex)); JSON_THROW(*static_cast<const detail::invalid_iterator*>(&ex));
case 3: case 3:
JSON_THROW(*reinterpret_cast<const detail::type_error*>(&ex)); JSON_THROW(*static_cast<const detail::type_error*>(&ex));
case 5: case 5:
JSON_THROW(*reinterpret_cast<const detail::other_error*>(&ex)); JSON_THROW(*static_cast<const detail::other_error*>(&ex));
default: default:
assert(false); assert(false);
// LCOV_EXCL_STOP // LCOV_EXCL_STOP
......
...@@ -4512,16 +4512,16 @@ class json_sax_dom_parser ...@@ -4512,16 +4512,16 @@ class json_sax_dom_parser
switch ((ex.id / 100) % 100) switch ((ex.id / 100) % 100)
{ {
case 1: case 1:
JSON_THROW(*reinterpret_cast<const detail::parse_error*>(&ex)); JSON_THROW(*static_cast<const detail::parse_error*>(&ex));
case 4: case 4:
JSON_THROW(*reinterpret_cast<const detail::out_of_range*>(&ex)); JSON_THROW(*static_cast<const detail::out_of_range*>(&ex));
// LCOV_EXCL_START // LCOV_EXCL_START
case 2: case 2:
JSON_THROW(*reinterpret_cast<const detail::invalid_iterator*>(&ex)); JSON_THROW(*static_cast<const detail::invalid_iterator*>(&ex));
case 3: case 3:
JSON_THROW(*reinterpret_cast<const detail::type_error*>(&ex)); JSON_THROW(*static_cast<const detail::type_error*>(&ex));
case 5: case 5:
JSON_THROW(*reinterpret_cast<const detail::other_error*>(&ex)); JSON_THROW(*static_cast<const detail::other_error*>(&ex));
default: default:
assert(false); assert(false);
// LCOV_EXCL_STOP // LCOV_EXCL_STOP
...@@ -4769,16 +4769,16 @@ class json_sax_dom_callback_parser ...@@ -4769,16 +4769,16 @@ class json_sax_dom_callback_parser
switch ((ex.id / 100) % 100) switch ((ex.id / 100) % 100)
{ {
case 1: case 1:
JSON_THROW(*reinterpret_cast<const detail::parse_error*>(&ex)); JSON_THROW(*static_cast<const detail::parse_error*>(&ex));
case 4: case 4:
JSON_THROW(*reinterpret_cast<const detail::out_of_range*>(&ex)); JSON_THROW(*static_cast<const detail::out_of_range*>(&ex));
// LCOV_EXCL_START // LCOV_EXCL_START
case 2: case 2:
JSON_THROW(*reinterpret_cast<const detail::invalid_iterator*>(&ex)); JSON_THROW(*static_cast<const detail::invalid_iterator*>(&ex));
case 3: case 3:
JSON_THROW(*reinterpret_cast<const detail::type_error*>(&ex)); JSON_THROW(*static_cast<const detail::type_error*>(&ex));
case 5: case 5:
JSON_THROW(*reinterpret_cast<const detail::other_error*>(&ex)); JSON_THROW(*static_cast<const detail::other_error*>(&ex));
default: default:
assert(false); assert(false);
// LCOV_EXCL_STOP // LCOV_EXCL_STOP
......
...@@ -112,7 +112,8 @@ struct my_allocator : std::allocator<T> ...@@ -112,7 +112,8 @@ struct my_allocator : std::allocator<T>
} }
template <class U> template <class U>
struct rebind { struct rebind
{
using other = my_allocator<U>; using other = my_allocator<U>;
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment