Fix -Weffc++ in the BSON recorder test and a clang-tidy use-auto hit

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-26 06:53:50 +01:00
1 parent d19e030bf1
commit bf8dca5c16
3 files changed
+3 -3

No files matched your search

@@ -382,7 +382,7 @@ class binary_reader
// the declared size bounds where the document ends: an embedded
// document must end before the terminator of the document that contains it
const std::size_t unsigned_size = static_cast<std::size_t>(document_size);
const auto unsigned_size = static_cast<std::size_t>(document_size);
const std::size_t document_end = unsigned_size > (std::numeric_limits<std::size_t>::max)() - document_start
? (std::numeric_limits<std::size_t>::max)()
: document_start + unsigned_size;