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-10 21:37:48 +02:00
1 parent d7299cc423
commit fbaa2f513e
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;
}