mirror of
https://github.com/nlohmann/json.git
synced 2026-10-25 15:28:54 +00:00
Fix clang-tidy findings in documentation examples and replace redundant aliases
Apply clang-tidy fixes to the documentation examples: - performance-avoid-endl: std::endl -> '\n' - readability-qualified-auto: auto -> auto* / const auto* - performance-for-range-copy: copy -> const reference - google-readability-casting: C-style cast -> static_cast Replace redundant aliases (readability-redundant-qualified-alias) such as "using json = nlohmann::json;" with "using nlohmann::json;" in the documentation, README, examples, tests, and benchmarks. Aliases at class scope and aliases of other types (with_base_class_t etc.) are kept. No changes to the library or its public API. All changed examples were compiled and run; their output matches the stored .output files (except max_size and meta, which depend on the platform and compiler). Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
366 files changed
+592
-592
No files matched your search
@@ -21,7 +21,7 @@
|
||||
#include <vector>
|
||||
#include <test_data.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
using nlohmann::json;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// parse JSON from file
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <string>
|
||||
#include <test_data.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
using json_document = nlohmann::json_document;
|
||||
using nlohmann::json;
|
||||
using nlohmann::json_document;
|
||||
|
||||
static std::string read_file(const char* filename)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user