removing variable to prevent warnings

Co-Authpred-By: Patrick Boettcher <pboettch@users.noreply.github.com>
This commit is contained in:
Chris Mc 2020-04-25 14:19:11 -04:00 committed by GitHub
parent 35e06a95a8
commit ad19c6f04f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,5 @@
#include "json-patch.hpp" #include "json-patch.hpp"
#ifdef __has_cpp_attribute
#if __has_cpp_attribute(maybe_unused)
#define JSV_MAYBE_UNUSED [[maybe_unused]]
#endif
#endif
#ifndef JSV_MAYBE_UNUSED
#define JSV_MAYBE_UNUSED
#endif
namespace nlohmann namespace nlohmann
{ {
@ -69,7 +59,7 @@ void json_patch::validateJsonPatch(json const &patch)
try { try {
// try parse to path // try parse to path
JSV_MAYBE_UNUSED const auto p = json::json_pointer{op["path"].get<std::string>()}; json::json_pointer{op["path"].get<std::string>()};
} catch (json::exception &e) { } catch (json::exception &e) {
throw JsonPatchFormatException{e.what()}; throw JsonPatchFormatException{e.what()};
} }