mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 15:16:47 +02:00
clang-tidy + any_of usage (#1171)
* [clang-tidy] change functions to static Found with readability-convert-member-functions-to-static Signed-off-by: Rosen Penev <rosenp@gmail.com> * optimize JsonWriter::validate #1171 * do the same for json_reader Signed-off-by: Rosen Penev <rosenp@gmail.com> * use std::any_of Also simplified two loops. Signed-off-by: Rosen Penev <rosenp@gmail.com> Co-authored-by: Billy Donahue <billy.donahue@gmail.com>
This commit is contained in:
@@ -3286,11 +3286,11 @@ struct CharReaderAllowDropNullTest : JsonTest::TestCase {
|
||||
return [=](const Value& root) { JSONTEST_ASSERT_EQUAL(root, v); };
|
||||
}
|
||||
|
||||
ValueCheck objGetAnd(std::string idx, ValueCheck f) {
|
||||
static ValueCheck objGetAnd(std::string idx, ValueCheck f) {
|
||||
return [=](const Value& root) { f(root.get(idx, true)); };
|
||||
}
|
||||
|
||||
ValueCheck arrGetAnd(int idx, ValueCheck f) {
|
||||
static ValueCheck arrGetAnd(int idx, ValueCheck f) {
|
||||
return [=](const Value& root) { f(root[idx]); };
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user