From 86aabf2ff939c643a8f29dce14227177e9c7bf32 Mon Sep 17 00:00:00 2001 From: Westlanderz Date: Fri, 11 Jun 2021 21:25:11 +0200 Subject: [PATCH 1/2] Added include that was nessasary in this file --- discordpp/constructs/todo.hh | 2 ++ discordpp/util/construct.hh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/discordpp/constructs/todo.hh b/discordpp/constructs/todo.hh index 10c7103..e33a442 100644 --- a/discordpp/constructs/todo.hh +++ b/discordpp/constructs/todo.hh @@ -4,6 +4,8 @@ #pragma once +#include + namespace discordpp { using json = nlohmann::json; diff --git a/discordpp/util/construct.hh b/discordpp/util/construct.hh index 19ad13f..cba1ea8 100644 --- a/discordpp/util/construct.hh +++ b/discordpp/util/construct.hh @@ -4,6 +4,8 @@ #pragma once +#include + namespace discordpp { using json = nlohmann::json; template using opt = std::optional; From 8abd49874ceddc1710fa11a64bf8ad1d6456071e Mon Sep 17 00:00:00 2001 From: Westlanderz Date: Sat, 19 Jun 2021 17:13:24 +0200 Subject: [PATCH 2/2] Fixed an issue when creating the array --- discordpp/CONSTRUCTIN/FROMJSON.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discordpp/CONSTRUCTIN/FROMJSON.hh b/discordpp/CONSTRUCTIN/FROMJSON.hh index f40fe64..1733c3b 100644 --- a/discordpp/CONSTRUCTIN/FROMJSON.hh +++ b/discordpp/CONSTRUCTIN/FROMJSON.hh @@ -21,9 +21,9 @@ std::vector sfs; \ auto jk = j[key]; \ std::transform(jk.begin(), jk.end(), std::back_inserter(sfs), \ - [&key](const json &j) { \ + [](const json &j) { \ snowflake sf; \ - std::istringstream(j[key].get()) >> \ + std::istringstream(j.get()) >> \ sf; \ return sf; \ }); \