Skip to content

Commit 126d44e

Browse files
committed
DiscordCoreAPI v2.0.9
1 parent a6d1022 commit 126d44e

File tree

20 files changed

+284
-444
lines changed

20 files changed

+284
-444
lines changed

CMake/BuildFeatureTester.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

CMake/BuildFeatureTester.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

CMake/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

CMake/DCADetectArchitecture.cmake

Lines changed: 0 additions & 117 deletions
This file was deleted.

CMake/main.cpp

Lines changed: 0 additions & 184 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ set(Opus_DIR "C:/Vcpkg/installed/x64-windows-static/share/opus") # Set this one
2525
set(unofficial-sodium_DIR "C:/Vcpkg/installed/x64-windows-static/share/unofficial-sodium") # Set this one to the folder location of the file "unofficial-sodiumConfig.cmake".
2626
set(Jsonifier_DIR "") # Set this one to the folder location of the file "JsonifierConfig.cmake".
2727
set(OPENSSL_ROOT_DIR "C:/Vcpkg/installed/x64-windows-static/") # Set this one to the folder location of the include folder and library folders of OpenSSL.
28-
set(VCPKG_ROOT_DIR "C:/Vcpkg")
2928
set(CMAKE_BUILD_TYPES "Release;Debug")
3029
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
3130
set(DEV TRUE)
3231

33-
if (EXISTS "${VCPKG_ROOT_DIR}")
32+
if (EXISTS "${_VCPKG_ROOT_DIR}")
33+
set(VCPKG_ROOT_DIR "${_VCPKG_ROOT_DIR}")
34+
set(ENV{VCPKG_INSTALLATION_ROOT} "${_VCPKG_ROOT_DIR}")
35+
else()
36+
set(VCPKG_ROOT_DIR "C:/Vcpkg")
3437
set(ENV{VCPKG_INSTALLATION_ROOT} "${VCPKG_ROOT_DIR}")
3538
endif()
3639

Include/discordcoreapi/JsonSpecializations.hpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,17 @@ namespace jsonifier_internal {
6969

7070
template<jsonifier::serialize_options options, snowflake_t value_type, jsonifier::concepts::buffer_like buffer_type, typename index_type, typename indent_type>
7171
struct serialize_impl<options, value_type, buffer_type, index_type, indent_type> {
72-
template<typename value_type_new> JSONIFIER_ALWAYS_INLINE static void impl(value_type_new&& value, buffer_type& buffer, index_type&index, indent_type& indent) noexcept {
72+
template<typename value_type_new> DCA_ALWAYS_INLINE static void impl(value_type_new&& value, buffer_type& buffer, index_type&index, indent_type& indent) noexcept {
7373
jsonifier::string newString{ static_cast<jsonifier::string>(value) };
7474
serialize<options>::impl(newString, buffer, index, indent);
7575
}
7676
};
7777

78-
template<bool minified, jsonifier::parse_options options, snowflake_t value_type, typename parse_context_type> struct parse_impl<minified, options, value_type, parse_context_type> {
79-
JSONIFIER_ALWAYS_INLINE static void impl(value_type& value, parse_context_type& context) noexcept {
78+
template<bool minified, jsonifier::parse_options options, snowflake_t value_type, typename buffer_type, typename parse_context_type>
79+
struct parse_impl<minified, options, value_type, buffer_type, parse_context_type> {
80+
DCA_ALWAYS_INLINE static void impl(value_type& value, parse_context_type& context) noexcept {
8081
jsonifier::raw_json_data newString{};
81-
parse<minified, options>::impl(newString, context);
82+
parse<minified, options>::template impl<buffer_type>(newString, context);
8283
if (newString.getType() == jsonifier::json_type::String) {
8384
value = newString.get<jsonifier::string>();
8485
} else {
@@ -92,17 +93,17 @@ namespace jsonifier_internal {
9293

9394
template<jsonifier::serialize_options options, time_stamp_t value_type, jsonifier::concepts::buffer_like buffer_type, typename index_type, typename indent_type>
9495
struct serialize_impl<options, value_type, buffer_type, index_type, indent_type> {
95-
template<typename value_type_new> JSONIFIER_ALWAYS_INLINE static void impl(value_type_new&& value, buffer_type& buffer, index_type& index, indent_type& indent) noexcept {
96+
template<typename value_type_new> DCA_ALWAYS_INLINE static void impl(value_type_new&& value, buffer_type& buffer, index_type& index, indent_type& indent) noexcept {
9697
jsonifier::string newString{ static_cast<jsonifier::string>(value) };
9798
serialize<options>::impl(newString, buffer, index, indent);
9899
}
99100
};
100101

101-
template<bool minified, jsonifier::parse_options options, time_stamp_t value_type, typename parse_context_type>
102-
struct parse_impl<minified, options, value_type, parse_context_type> {
103-
JSONIFIER_ALWAYS_INLINE static void impl(value_type& value, parse_context_type& context) noexcept {
102+
template<bool minified, jsonifier::parse_options options, time_stamp_t value_type, typename buffer_type, typename parse_context_type>
103+
struct parse_impl<minified, options, value_type, buffer_type, parse_context_type> {
104+
DCA_ALWAYS_INLINE static void impl(value_type& value, parse_context_type& context) noexcept {
104105
jsonifier::raw_json_data newString{};
105-
parse<minified, options>::impl(newString, context);
106+
parse<minified, options>::template impl<buffer_type>(newString, context);
106107
if (newString.getType() == jsonifier::json_type::String) {
107108
value = newString.get<jsonifier::string>();
108109
} else {

0 commit comments

Comments
 (0)