mirror of
https://github.com/nlohmann/json.git
synced 2026-10-12 17:37:15 +00:00
Keep the view's edit headers clean for clang-tidy in C++17 mode
clang-tidy 22 checks the headers with -std=gnu++17 as well, where it asks for a transparent comparator and std::make_unique. The regions map uses its default comparator, and the allocation of the edit state keeps new (the library is C++11) with a NOLINT. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -39,7 +39,7 @@ inline document_data::edit_state& edit_state_of(document_data& d)
|
||||
{
|
||||
if (!d.edits)
|
||||
{
|
||||
d.edits.reset(new document_data::edit_state()); // NOLINT(cppcoreguidelines-owning-memory): owned by the unique_ptr
|
||||
d.edits.reset(new document_data::edit_state()); // NOLINT(cppcoreguidelines-owning-memory,modernize-make-unique): owned by the unique_ptr; std::make_unique is C++14
|
||||
}
|
||||
return *d.edits;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user