diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-19 20:35:10 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-19 20:35:10 -0400 |
commit | cb73bba135933357878dc47f6e7a6bec3168d001 (patch) | |
tree | 0bcced1046c53b6322a6d680db4aca7edbc9371f /discord/json.hpp | |
parent | 49a6e581375fdf0b5f5e82f981ca2d7cb419267f (diff) | |
download | abaddon-portaudio-cb73bba135933357878dc47f6e7a6bec3168d001.tar.gz abaddon-portaudio-cb73bba135933357878dc47f6e7a6bec3168d001.zip |
CHANNEL_CREATE, CHANNEL_UPDATE, CHANNEL_DELETE
Diffstat (limited to 'discord/json.hpp')
-rw-r--r-- | discord/json.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/discord/json.hpp b/discord/json.hpp index 1cd4a14..3f78391 100644 --- a/discord/json.hpp +++ b/discord/json.hpp @@ -21,3 +21,25 @@ if (j.contains(k) && !j.at(k).is_null()) \ j.at(k).get_to(t); \ } while (0) + +#define JS_RD(k, t) \ + do { \ + if (j.contains(k)) { \ + if (j.at(k).is_null()) { \ + t = decltype(t)(); \ + } else { \ + j.at(k).get_to(t); \ + } \ + } \ + } while (0) + +#define JS_RV(k, t, d) \ + do { \ + if (j.contains(k)) { \ + if (j.at(k).is_null()) { \ + t = d; \ + } else { \ + j.at(k).get_to(t); \ + } \ + } \ + } while (0) |