diff --git a/Dockerfile b/Dockerfile index 551a2a1..ee2d086 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,7 +73,7 @@ RUN \ cmake -H. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release && \ cmake --build build --target install && \ # json.hpp - curl -L https://github.com/nlohmann/json/releases/download/v3.2.0/json.hpp -o /usr/local/include/json.hpp && \ + curl -L https://github.com/nlohmann/json/releases/download/v3.2.0/json.hpp -o /usr/local/include/nlohmann/json.hpp && \ rm -rf /build/* && \ rm -rf /var/lib/apt/lists/* && \ apt-get clean && \ diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 13c110a..ed0a5d2 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -53,7 +53,7 @@ set(JSON_HEADER_URL set(JSON_HEADER_HASH ce6b5610a051ec6795fa11c33854abebb086f0fd67c311f5921c3c07f9531b44) -file(DOWNLOAD ${JSON_HEADER_URL} ${DEPS_INSTALL_DIR}/include/json.hpp +file(DOWNLOAD ${JSON_HEADER_URL} ${DEPS_INSTALL_DIR}/include/nlohmann/json.hpp EXPECTED_HASH SHA256=${JSON_HEADER_HASH}) if(USE_BUNDLED_BOOST) diff --git a/examples/crypto_bot.cpp b/examples/crypto_bot.cpp index 270ba5d..b9c29b1 100644 --- a/examples/crypto_bot.cpp +++ b/examples/crypto_bot.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/simple_bot.cpp b/examples/simple_bot.cpp index 051584c..d228da6 100644 --- a/examples/simple_bot.cpp +++ b/examples/simple_bot.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/include/mtx/common.hpp b/include/mtx/common.hpp index 5fa2a17..6dbb803 100644 --- a/include/mtx/common.hpp +++ b/include/mtx/common.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/include/mtx/errors.hpp b/include/mtx/errors.hpp index 52fb38f..d433089 100644 --- a/include/mtx/errors.hpp +++ b/include/mtx/errors.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events.hpp b/include/mtx/events.hpp index 38dac94..83bff9d 100644 --- a/include/mtx/events.hpp +++ b/include/mtx/events.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include diff --git a/include/mtx/events/aliases.hpp b/include/mtx/events/aliases.hpp index b2b18f7..1254277 100644 --- a/include/mtx/events/aliases.hpp +++ b/include/mtx/events/aliases.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include using json = nlohmann::json; diff --git a/include/mtx/events/avatar.hpp b/include/mtx/events/avatar.hpp index a47490a..f554f9d 100644 --- a/include/mtx/events/avatar.hpp +++ b/include/mtx/events/avatar.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include using json = nlohmann::json; diff --git a/include/mtx/events/canonical_alias.hpp b/include/mtx/events/canonical_alias.hpp index 23207cc..fc371a9 100644 --- a/include/mtx/events/canonical_alias.hpp +++ b/include/mtx/events/canonical_alias.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include using json = nlohmann::json; diff --git a/include/mtx/events/common.hpp b/include/mtx/events/common.hpp index 8865390..7d97191 100644 --- a/include/mtx/events/common.hpp +++ b/include/mtx/events/common.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include using json = nlohmann::json; diff --git a/include/mtx/events/create.hpp b/include/mtx/events/create.hpp index e1b1b47..cf85389 100644 --- a/include/mtx/events/create.hpp +++ b/include/mtx/events/create.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include using json = nlohmann::json; diff --git a/include/mtx/events/encrypted.hpp b/include/mtx/events/encrypted.hpp index 9df13e8..2077c1c 100644 --- a/include/mtx/events/encrypted.hpp +++ b/include/mtx/events/encrypted.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "mtx/events.hpp" diff --git a/include/mtx/events/encryption.hpp b/include/mtx/events/encryption.hpp index 962de5c..4eab0e7 100644 --- a/include/mtx/events/encryption.hpp +++ b/include/mtx/events/encryption.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include using json = nlohmann::json; diff --git a/include/mtx/events/guest_access.hpp b/include/mtx/events/guest_access.hpp index 8333640..6c8c8c2 100644 --- a/include/mtx/events/guest_access.hpp +++ b/include/mtx/events/guest_access.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/history_visibility.hpp b/include/mtx/events/history_visibility.hpp index 7a58ebc..ca277cb 100644 --- a/include/mtx/events/history_visibility.hpp +++ b/include/mtx/events/history_visibility.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/join_rules.hpp b/include/mtx/events/join_rules.hpp index 290e20a..f3edc17 100644 --- a/include/mtx/events/join_rules.hpp +++ b/include/mtx/events/join_rules.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/member.hpp b/include/mtx/events/member.hpp index 30beeec..3815f1d 100644 --- a/include/mtx/events/member.hpp +++ b/include/mtx/events/member.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/messages/audio.hpp b/include/mtx/events/messages/audio.hpp index 2b8a3b0..f671a38 100644 --- a/include/mtx/events/messages/audio.hpp +++ b/include/mtx/events/messages/audio.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include "mtx/events/common.hpp" diff --git a/include/mtx/events/messages/emote.hpp b/include/mtx/events/messages/emote.hpp index 3fafa2a..5991471 100644 --- a/include/mtx/events/messages/emote.hpp +++ b/include/mtx/events/messages/emote.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/messages/file.hpp b/include/mtx/events/messages/file.hpp index 848e984..9db6730 100644 --- a/include/mtx/events/messages/file.hpp +++ b/include/mtx/events/messages/file.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include "mtx/events/common.hpp" diff --git a/include/mtx/events/messages/image.hpp b/include/mtx/events/messages/image.hpp index f536bf1..a42a9c3 100644 --- a/include/mtx/events/messages/image.hpp +++ b/include/mtx/events/messages/image.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include "mtx/events/common.hpp" diff --git a/include/mtx/events/messages/notice.hpp b/include/mtx/events/messages/notice.hpp index 4c4f405..df90af0 100644 --- a/include/mtx/events/messages/notice.hpp +++ b/include/mtx/events/messages/notice.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/messages/text.hpp b/include/mtx/events/messages/text.hpp index e9849a0..3c7edcc 100644 --- a/include/mtx/events/messages/text.hpp +++ b/include/mtx/events/messages/text.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/messages/video.hpp b/include/mtx/events/messages/video.hpp index 23001db..2231de9 100644 --- a/include/mtx/events/messages/video.hpp +++ b/include/mtx/events/messages/video.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include "mtx/events/common.hpp" diff --git a/include/mtx/events/name.hpp b/include/mtx/events/name.hpp index f4c6a32..1e5af18 100644 --- a/include/mtx/events/name.hpp +++ b/include/mtx/events/name.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/pinned_events.hpp b/include/mtx/events/pinned_events.hpp index dc4d930..5f4b16c 100644 --- a/include/mtx/events/pinned_events.hpp +++ b/include/mtx/events/pinned_events.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/power_levels.hpp b/include/mtx/events/power_levels.hpp index 16b3618..9ce6bfa 100644 --- a/include/mtx/events/power_levels.hpp +++ b/include/mtx/events/power_levels.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/redaction.hpp b/include/mtx/events/redaction.hpp index 74c17ec..9125d92 100644 --- a/include/mtx/events/redaction.hpp +++ b/include/mtx/events/redaction.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/tag.hpp b/include/mtx/events/tag.hpp index 1b9581c..dcf16ab 100644 --- a/include/mtx/events/tag.hpp +++ b/include/mtx/events/tag.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/events/topic.hpp b/include/mtx/events/topic.hpp index 2e7c33c..e44e498 100644 --- a/include/mtx/events/topic.hpp +++ b/include/mtx/events/topic.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/identifiers.hpp b/include/mtx/identifiers.hpp index 1036c00..87acc43 100644 --- a/include/mtx/identifiers.hpp +++ b/include/mtx/identifiers.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include namespace mtx { namespace identifiers { diff --git a/include/mtx/requests.hpp b/include/mtx/requests.hpp index b073f1a..b66842d 100644 --- a/include/mtx/requests.hpp +++ b/include/mtx/requests.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include using json = nlohmann::json; diff --git a/include/mtx/responses/common.hpp b/include/mtx/responses/common.hpp index ef8e57c..2cda8c5 100644 --- a/include/mtx/responses/common.hpp +++ b/include/mtx/responses/common.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/include/mtx/responses/create_room.hpp b/include/mtx/responses/create_room.hpp index f5875d2..d460785 100644 --- a/include/mtx/responses/create_room.hpp +++ b/include/mtx/responses/create_room.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace mtx { namespace responses { diff --git a/include/mtx/responses/crypto.hpp b/include/mtx/responses/crypto.hpp index 6d843ce..fd750ac 100644 --- a/include/mtx/responses/crypto.hpp +++ b/include/mtx/responses/crypto.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "mtx/common.hpp" diff --git a/include/mtx/responses/empty.hpp b/include/mtx/responses/empty.hpp index 885d1c7..60a3b70 100644 --- a/include/mtx/responses/empty.hpp +++ b/include/mtx/responses/empty.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include "mtx/identifiers.hpp" diff --git a/include/mtx/responses/groups.hpp b/include/mtx/responses/groups.hpp index c0fe71e..fa7c014 100644 --- a/include/mtx/responses/groups.hpp +++ b/include/mtx/responses/groups.hpp @@ -1,6 +1,6 @@ #pragma once -#include "json.hpp" +#include namespace mtx { namespace responses { diff --git a/include/mtx/responses/login.hpp b/include/mtx/responses/login.hpp index 0d2490b..5aaf4e7 100644 --- a/include/mtx/responses/login.hpp +++ b/include/mtx/responses/login.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include "mtx/identifiers.hpp" diff --git a/include/mtx/responses/media.hpp b/include/mtx/responses/media.hpp index a4d7770..ec60fed 100644 --- a/include/mtx/responses/media.hpp +++ b/include/mtx/responses/media.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include namespace mtx { diff --git a/include/mtx/responses/messages.hpp b/include/mtx/responses/messages.hpp index 42817b5..3b09ef4 100644 --- a/include/mtx/responses/messages.hpp +++ b/include/mtx/responses/messages.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include "mtx/events/collections.hpp" diff --git a/include/mtx/responses/notifications.hpp b/include/mtx/responses/notifications.hpp index 82d80c8..d698538 100644 --- a/include/mtx/responses/notifications.hpp +++ b/include/mtx/responses/notifications.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "mtx/events/collections.hpp" diff --git a/include/mtx/responses/profile.hpp b/include/mtx/responses/profile.hpp index 31087e8..47c3d14 100644 --- a/include/mtx/responses/profile.hpp +++ b/include/mtx/responses/profile.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace mtx { namespace responses { diff --git a/include/mtx/responses/register.hpp b/include/mtx/responses/register.hpp index b62a687..169dfea 100644 --- a/include/mtx/responses/register.hpp +++ b/include/mtx/responses/register.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include "mtx/identifiers.hpp" diff --git a/include/mtx/responses/sync.hpp b/include/mtx/responses/sync.hpp index 6bfc176..b23e2d4 100644 --- a/include/mtx/responses/sync.hpp +++ b/include/mtx/responses/sync.hpp @@ -7,7 +7,7 @@ #include "mtx/events.hpp" #include "mtx/events/collections.hpp" #include "mtx/identifiers.hpp" -#include +#include using json = nlohmann::json; diff --git a/include/mtx/responses/version.hpp b/include/mtx/responses/version.hpp index 69883b7..bc0ab5c 100644 --- a/include/mtx/responses/version.hpp +++ b/include/mtx/responses/version.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace mtx { namespace responses { diff --git a/include/mtxclient/crypto/client.hpp b/include/mtxclient/crypto/client.hpp index 740166b..f9a354b 100644 --- a/include/mtxclient/crypto/client.hpp +++ b/include/mtxclient/crypto/client.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include diff --git a/include/mtxclient/crypto/types.hpp b/include/mtxclient/crypto/types.hpp index 2877575..675e2b1 100644 --- a/include/mtxclient/crypto/types.hpp +++ b/include/mtxclient/crypto/types.hpp @@ -1,7 +1,7 @@ #pragma once #include "mtxclient/utils.hpp" -#include +#include STRONG_TYPE(UserId, std::string) STRONG_TYPE(DeviceId, std::string) diff --git a/include/mtxclient/http/client.hpp b/include/mtxclient/http/client.hpp index 263f09f..5de17ab 100644 --- a/include/mtxclient/http/client.hpp +++ b/include/mtxclient/http/client.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/mtxclient/utils.hpp b/include/mtxclient/utils.hpp index a91c4d0..3af32d8 100644 --- a/include/mtxclient/utils.hpp +++ b/include/mtxclient/utils.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include namespace mtx { namespace client { diff --git a/lib/structs/events/aliases.cpp b/lib/structs/events/aliases.cpp index 89c882e..fa44f20 100644 --- a/lib/structs/events/aliases.cpp +++ b/lib/structs/events/aliases.cpp @@ -1,4 +1,4 @@ -#include +#include using json = nlohmann::json; diff --git a/lib/structs/events/avatar.cpp b/lib/structs/events/avatar.cpp index af9bc94..2f1e620 100644 --- a/lib/structs/events/avatar.cpp +++ b/lib/structs/events/avatar.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include "mtx/events/avatar.hpp" diff --git a/lib/structs/events/canonical_alias.cpp b/lib/structs/events/canonical_alias.cpp index dbdb3a7..1947348 100644 --- a/lib/structs/events/canonical_alias.cpp +++ b/lib/structs/events/canonical_alias.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include "mtx/events/canonical_alias.hpp" diff --git a/lib/structs/events/common.cpp b/lib/structs/events/common.cpp index 25fbd09..dc9717e 100644 --- a/lib/structs/events/common.cpp +++ b/lib/structs/events/common.cpp @@ -1,4 +1,4 @@ -#include +#include #include "mtx/events/common.hpp" diff --git a/lib/structs/events/guest_access.cpp b/lib/structs/events/guest_access.cpp index 0a92d71..20e9f40 100644 --- a/lib/structs/events/guest_access.cpp +++ b/lib/structs/events/guest_access.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/guest_access.hpp" diff --git a/lib/structs/events/history_visibility.cpp b/lib/structs/events/history_visibility.cpp index cac92f0..e5624f4 100644 --- a/lib/structs/events/history_visibility.cpp +++ b/lib/structs/events/history_visibility.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/history_visibility.hpp" diff --git a/lib/structs/events/join_rules.cpp b/lib/structs/events/join_rules.cpp index d521c88..427c674 100644 --- a/lib/structs/events/join_rules.cpp +++ b/lib/structs/events/join_rules.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/join_rules.hpp" diff --git a/lib/structs/events/member.cpp b/lib/structs/events/member.cpp index b38cc51..4115b6d 100644 --- a/lib/structs/events/member.cpp +++ b/lib/structs/events/member.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/member.hpp" diff --git a/lib/structs/events/messages/audio.cpp b/lib/structs/events/messages/audio.cpp index 410472c..a2cd226 100644 --- a/lib/structs/events/messages/audio.cpp +++ b/lib/structs/events/messages/audio.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/messages/audio.hpp" diff --git a/lib/structs/events/messages/emote.cpp b/lib/structs/events/messages/emote.cpp index 54ea890..2893b73 100644 --- a/lib/structs/events/messages/emote.cpp +++ b/lib/structs/events/messages/emote.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/common.hpp" diff --git a/lib/structs/events/messages/file.cpp b/lib/structs/events/messages/file.cpp index 0d1c2c4..add735a 100644 --- a/lib/structs/events/messages/file.cpp +++ b/lib/structs/events/messages/file.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/messages/file.hpp" diff --git a/lib/structs/events/messages/image.cpp b/lib/structs/events/messages/image.cpp index c3e0726..f0e5200 100644 --- a/lib/structs/events/messages/image.cpp +++ b/lib/structs/events/messages/image.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/messages/image.hpp" diff --git a/lib/structs/events/messages/notice.cpp b/lib/structs/events/messages/notice.cpp index 4658cd2..009e0b9 100644 --- a/lib/structs/events/messages/notice.cpp +++ b/lib/structs/events/messages/notice.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/common.hpp" diff --git a/lib/structs/events/messages/text.cpp b/lib/structs/events/messages/text.cpp index 344f12e..de25158 100644 --- a/lib/structs/events/messages/text.cpp +++ b/lib/structs/events/messages/text.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/common.hpp" diff --git a/lib/structs/events/messages/video.cpp b/lib/structs/events/messages/video.cpp index e4ff571..bac206a 100644 --- a/lib/structs/events/messages/video.cpp +++ b/lib/structs/events/messages/video.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/common.hpp" diff --git a/lib/structs/events/name.cpp b/lib/structs/events/name.cpp index a80fb4b..81b1e8d 100644 --- a/lib/structs/events/name.cpp +++ b/lib/structs/events/name.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/name.hpp" diff --git a/lib/structs/events/pinned_events.cpp b/lib/structs/events/pinned_events.cpp index 96f1e4d..04c35d7 100644 --- a/lib/structs/events/pinned_events.cpp +++ b/lib/structs/events/pinned_events.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/pinned_events.hpp" diff --git a/lib/structs/events/power_levels.cpp b/lib/structs/events/power_levels.cpp index 745d44b..4df80c6 100644 --- a/lib/structs/events/power_levels.cpp +++ b/lib/structs/events/power_levels.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/power_levels.hpp" diff --git a/lib/structs/events/redaction.cpp b/lib/structs/events/redaction.cpp index cde161e..b727658 100644 --- a/lib/structs/events/redaction.cpp +++ b/lib/structs/events/redaction.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "mtx/events/redaction.hpp" diff --git a/tests/crypto.cpp b/tests/crypto.cpp index 857c0c3..2c4871f 100644 --- a/tests/crypto.cpp +++ b/tests/crypto.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/tests/events.cpp b/tests/events.cpp index 28a98dd..21bd18a 100644 --- a/tests/events.cpp +++ b/tests/events.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include using json = nlohmann::json; diff --git a/tests/messages.cpp b/tests/messages.cpp index c253879..f81f9fc 100644 --- a/tests/messages.cpp +++ b/tests/messages.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include using json = nlohmann::json; diff --git a/tests/requests.cpp b/tests/requests.cpp index f0aa7d9..9d52491 100644 --- a/tests/requests.cpp +++ b/tests/requests.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include diff --git a/tests/responses.cpp b/tests/responses.cpp index ec93597..acdf677 100644 --- a/tests/responses.cpp +++ b/tests/responses.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include diff --git a/tests/utils.cpp b/tests/utils.cpp index 42bba6d..454aa3a 100644 --- a/tests/utils.cpp +++ b/tests/utils.cpp @@ -1,6 +1,6 @@ #include -#include "json.hpp" +#include #include #include