From cbf08bda78dca070f013a26a0ecf6bbb1c6a2f93 Mon Sep 17 00:00:00 2001 From: Francisco Geiman Thiesen Date: Sun, 9 Feb 2025 20:25:08 -0800 Subject: [PATCH] Fixing unused argument problem and updating the singleheader file --- singleheader/simdjson.cpp | 6 ++-- singleheader/simdjson.h | 66 +++++++++++++++++++-------------------- src/implementation.cpp | 4 +-- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/singleheader/simdjson.cpp b/singleheader/simdjson.cpp index 45c3dda48..762e4ee7f 100644 --- a/singleheader/simdjson.cpp +++ b/singleheader/simdjson.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2025-02-04 17:42:04 -0500. Do not edit! */ +/* auto-generated on 2025-02-05 16:09:26 -0800. Do not edit! */ /* including simdjson.cpp: */ /* begin file simdjson.cpp */ #define SIMDJSON_SRC_SIMDJSON_CPP @@ -7649,8 +7649,8 @@ public: simdjson_warn_unused error_code minify(const uint8_t *, size_t, uint8_t *, size_t &) const noexcept final override { return UNSUPPORTED_ARCHITECTURE; } - simdjson_warn_unused size_t write_string_escaped(const std::string_view input, char *out) const noexcept final { - return 0; + simdjson_warn_unused size_t write_string_escaped(const std::string_view, char *) const noexcept final override { + return 0; // TODO: Evaluate whether this is the right thing to do for unsupported architecture. } simdjson_warn_unused bool validate_utf8(const char *, size_t) const noexcept final override { return false; // Just refuse to validate. Given that we have a fallback implementation diff --git a/singleheader/simdjson.h b/singleheader/simdjson.h index b1c990db9..8a950795a 100644 --- a/singleheader/simdjson.h +++ b/singleheader/simdjson.h @@ -1,4 +1,4 @@ -/* auto-generated on 2025-02-04 17:42:04 -0500. Do not edit! */ +/* auto-generated on 2025-02-05 16:09:26 -0800. Do not edit! */ /* including simdjson.h: */ /* begin file simdjson.h */ #ifndef SIMDJSON_H @@ -43178,7 +43178,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { static_assert(std::is_same::value || std::is_integral::value || std::is_floating_point::value, "Unsupported number type"); // If C++17 is available, we can 'if constexpr' here. - if constexpr (std::is_same::value) { + SIMDJSON_IF_CONSTEXPR (std::is_same::value) { if (v) { constexpr char true_literal[] = "true"; constexpr size_t true_len = sizeof(true_literal) - 1; @@ -43194,7 +43194,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { position += false_len; } } - } else if constexpr (std::is_unsigned::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_unsigned::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -43209,7 +43209,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_integral::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_integral::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -43228,7 +43228,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_floating_point::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_floating_point::value) { constexpr size_t max_number_size = 24; if(capacity_check(max_number_size)) { // We could specialize for float. @@ -54627,7 +54627,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { static_assert(std::is_same::value || std::is_integral::value || std::is_floating_point::value, "Unsupported number type"); // If C++17 is available, we can 'if constexpr' here. - if constexpr (std::is_same::value) { + SIMDJSON_IF_CONSTEXPR (std::is_same::value) { if (v) { constexpr char true_literal[] = "true"; constexpr size_t true_len = sizeof(true_literal) - 1; @@ -54643,7 +54643,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { position += false_len; } } - } else if constexpr (std::is_unsigned::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_unsigned::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -54658,7 +54658,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_integral::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_integral::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -54677,7 +54677,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_floating_point::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_floating_point::value) { constexpr size_t max_number_size = 24; if(capacity_check(max_number_size)) { // We could specialize for float. @@ -66575,7 +66575,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { static_assert(std::is_same::value || std::is_integral::value || std::is_floating_point::value, "Unsupported number type"); // If C++17 is available, we can 'if constexpr' here. - if constexpr (std::is_same::value) { + SIMDJSON_IF_CONSTEXPR (std::is_same::value) { if (v) { constexpr char true_literal[] = "true"; constexpr size_t true_len = sizeof(true_literal) - 1; @@ -66591,7 +66591,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { position += false_len; } } - } else if constexpr (std::is_unsigned::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_unsigned::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -66606,7 +66606,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_integral::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_integral::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -66625,7 +66625,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_floating_point::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_floating_point::value) { constexpr size_t max_number_size = 24; if(capacity_check(max_number_size)) { // We could specialize for float. @@ -78519,7 +78519,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { static_assert(std::is_same::value || std::is_integral::value || std::is_floating_point::value, "Unsupported number type"); // If C++17 is available, we can 'if constexpr' here. - if constexpr (std::is_same::value) { + SIMDJSON_IF_CONSTEXPR (std::is_same::value) { if (v) { constexpr char true_literal[] = "true"; constexpr size_t true_len = sizeof(true_literal) - 1; @@ -78535,7 +78535,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { position += false_len; } } - } else if constexpr (std::is_unsigned::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_unsigned::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -78550,7 +78550,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_integral::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_integral::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -78569,7 +78569,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_floating_point::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_floating_point::value) { constexpr size_t max_number_size = 24; if(capacity_check(max_number_size)) { // We could specialize for float. @@ -90581,7 +90581,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { static_assert(std::is_same::value || std::is_integral::value || std::is_floating_point::value, "Unsupported number type"); // If C++17 is available, we can 'if constexpr' here. - if constexpr (std::is_same::value) { + SIMDJSON_IF_CONSTEXPR (std::is_same::value) { if (v) { constexpr char true_literal[] = "true"; constexpr size_t true_len = sizeof(true_literal) - 1; @@ -90597,7 +90597,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { position += false_len; } } - } else if constexpr (std::is_unsigned::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_unsigned::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -90612,7 +90612,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_integral::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_integral::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -90631,7 +90631,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_floating_point::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_floating_point::value) { constexpr size_t max_number_size = 24; if(capacity_check(max_number_size)) { // We could specialize for float. @@ -102960,7 +102960,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { static_assert(std::is_same::value || std::is_integral::value || std::is_floating_point::value, "Unsupported number type"); // If C++17 is available, we can 'if constexpr' here. - if constexpr (std::is_same::value) { + SIMDJSON_IF_CONSTEXPR (std::is_same::value) { if (v) { constexpr char true_literal[] = "true"; constexpr size_t true_len = sizeof(true_literal) - 1; @@ -102976,7 +102976,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { position += false_len; } } - } else if constexpr (std::is_unsigned::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_unsigned::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -102991,7 +102991,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_integral::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_integral::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -103010,7 +103010,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_floating_point::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_floating_point::value) { constexpr size_t max_number_size = 24; if(capacity_check(max_number_size)) { // We could specialize for float. @@ -114816,7 +114816,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { static_assert(std::is_same::value || std::is_integral::value || std::is_floating_point::value, "Unsupported number type"); // If C++17 is available, we can 'if constexpr' here. - if constexpr (std::is_same::value) { + SIMDJSON_IF_CONSTEXPR (std::is_same::value) { if (v) { constexpr char true_literal[] = "true"; constexpr size_t true_len = sizeof(true_literal) - 1; @@ -114832,7 +114832,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { position += false_len; } } - } else if constexpr (std::is_unsigned::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_unsigned::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -114847,7 +114847,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_integral::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_integral::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -114866,7 +114866,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_floating_point::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_floating_point::value) { constexpr size_t max_number_size = 24; if(capacity_check(max_number_size)) { // We could specialize for float. @@ -126685,7 +126685,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { static_assert(std::is_same::value || std::is_integral::value || std::is_floating_point::value, "Unsupported number type"); // If C++17 is available, we can 'if constexpr' here. - if constexpr (std::is_same::value) { + SIMDJSON_IF_CONSTEXPR (std::is_same::value) { if (v) { constexpr char true_literal[] = "true"; constexpr size_t true_len = sizeof(true_literal) - 1; @@ -126701,7 +126701,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { position += false_len; } } - } else if constexpr (std::is_unsigned::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_unsigned::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -126716,7 +126716,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_integral::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_integral::value) { constexpr size_t max_number_size = 20; if(capacity_check(max_number_size)) { using unsigned_type = typename std::make_unsigned::type; @@ -126735,7 +126735,7 @@ simdjson_inline void string_builder::append(number_type v) noexcept { *write_pointer = char('0' + pv); position += dc; } - } else if constexpr (std::is_floating_point::value) { + } else SIMDJSON_IF_CONSTEXPR (std::is_floating_point::value) { constexpr size_t max_number_size = 24; if(capacity_check(max_number_size)) { // We could specialize for float. diff --git a/src/implementation.cpp b/src/implementation.cpp index 50feda912..32d1f43de 100644 --- a/src/implementation.cpp +++ b/src/implementation.cpp @@ -239,8 +239,8 @@ public: simdjson_warn_unused error_code minify(const uint8_t *, size_t, uint8_t *, size_t &) const noexcept final override { return UNSUPPORTED_ARCHITECTURE; } - simdjson_warn_unused size_t write_string_escaped(const std::string_view input, char *out) const noexcept final { - return 0; + simdjson_warn_unused size_t write_string_escaped(const std::string_view, char *) const noexcept final override { + return 0; // TODO: Evaluate whether this is the right thing to do for unsupported architecture. } simdjson_warn_unused bool validate_utf8(const char *, size_t) const noexcept final override { return false; // Just refuse to validate. Given that we have a fallback implementation