From 15ec0fe150255efa9d387d0562e7b97ae67c4347 Mon Sep 17 00:00:00 2001 From: aodq Date: Fri, 24 Jul 2020 16:21:30 -0400 Subject: [PATCH] change c-style cast to static_cast for #2304 --- include/nlohmann/detail/input/json_sax.hpp | 4 ++-- single_include/nlohmann/json.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nlohmann/detail/input/json_sax.hpp b/include/nlohmann/detail/input/json_sax.hpp index d4c32913..223acd60 100644 --- a/include/nlohmann/detail/input/json_sax.hpp +++ b/include/nlohmann/detail/input/json_sax.hpp @@ -263,7 +263,7 @@ class json_sax_dom_parser const Exception& ex) { errored = true; - (void)ex; + static_cast(ex); if (allow_exceptions) { JSON_THROW(ex); @@ -502,7 +502,7 @@ class json_sax_dom_callback_parser const Exception& ex) { errored = true; - (void)ex; + static_cast(ex); if (allow_exceptions) { JSON_THROW(ex); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 67beb73a..c41df0e8 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -5441,7 +5441,7 @@ class json_sax_dom_parser const Exception& ex) { errored = true; - (void)ex; + static_cast(ex); if (allow_exceptions) { JSON_THROW(ex); @@ -5680,7 +5680,7 @@ class json_sax_dom_callback_parser const Exception& ex) { errored = true; - (void)ex; + static_cast(ex); if (allow_exceptions) { JSON_THROW(ex);