Fix test lints that are red on develop (effc++, clang-tidy) (#5946)

- unit-bson: initialize the SAX recorder's member (-Weffc++)
- unit-json_patch: build the reference document independently instead of
  copying it (performance-unnecessary-copy-initialization)
- unit-json_view_builder: use node_kind::link instead of an out-of-range
  enum cast (clang-analyzer-optin.core.EnumCastOutOfRange)

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann authored and GitHub committed 2026-10-27 17:25:18 +01:00
1 parent eb8f675bc9
commit 8617d9c94c
3 files changed
+11 -6

No files matched your search

+1 -1
View File
@@ -1311,7 +1311,7 @@ TEST_CASE("BSON declared document size bounds the content")
// records the events that a SAX parser receives
struct recorder : nlohmann::json_sax<json>
{
std::string events;
std::string events {};
bool null() override
{