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; \ }); \ 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;