Make max_input_size a function (GCC -Wunused-const-variable)

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-11 10:27:54 +02:00
1 parent 1d948b31e9
commit 4a4aa8cfc0
4 files changed
+7 -4

No files matched your search

+1 -1
View File
@@ -475,7 +475,7 @@ class basic_json_document
d.discarded = true;
detail::view::parse_failure failure;
bool ok = false;
if (NLOHMANN_VIEW_UNLIKELY(size > detail::view::max_input_size))
if (NLOHMANN_VIEW_UNLIKELY(size > detail::view::max_input_size()))
{
failure.code = detail::view::error_code::input_too_large;
}