From 2d5439ba90265e10f1ed2476e6a46eb997bce16b Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 1 Nov 2020 15:17:19 -0500 Subject: fix compile --- discord/json.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'discord') diff --git a/discord/json.hpp b/discord/json.hpp index beb1592..0b27d6d 100644 --- a/discord/json.hpp +++ b/discord/json.hpp @@ -12,7 +12,7 @@ struct is_optional<::std::optional> : ::std::true_type {}; template inline void json_direct(const ::nlohmann::json &j, const char *key, T &val) { if constexpr (is_optional::value) - val = j.at(key).get(); + val = j.at(key).get(); else j.at(key).get_to(val); } @@ -21,7 +21,7 @@ template inline void json_optional(const ::nlohmann::json &j, const char *key, T &val) { if constexpr (is_optional::value) { if (j.contains(key)) - val = j.at(key).get(); + val = j.at(key).get(); else val = ::std::nullopt; } else { @@ -35,7 +35,7 @@ inline void json_nullable(const ::nlohmann::json &j, const char *key, T &val) { if constexpr (is_optional::value) { const auto &at = j.at(key); if (!at.is_null()) - val = at.get(); + val = at.get(); else val = ::std::nullopt; } else { @@ -51,7 +51,7 @@ inline void json_optional_nullable(const ::nlohmann::json &j, const char *key, T if (j.contains(key)) { const auto &at = j.at(key); if (!at.is_null()) - val = at.get(); + val = at.get(); else val = ::std::nullopt; } else { @@ -72,7 +72,7 @@ inline void json_update_optional_nullable(const ::nlohmann::json &j, const char if (j.contains(key)) { const auto &at = j.at(key); if (!at.is_null()) - val = at.get(); + val = at.get(); else val = ::std::nullopt; } @@ -95,7 +95,7 @@ inline void json_update_optional_nullable_default(const ::nlohmann::json &j, con if (at.is_null()) val = fallback; else - val = at.get(); + val = at.get(); } } else { if (j.contains(key)) { -- cgit v1.2.3