mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-22 08:20:47 +08:00
STYLE: Use default member initialization
Converts a default constructor’s member initializers into the new default member initializers in C++11. Other member initializers that match the default member initializer are removed. This can reduce repeated code or allow use of ‘= default’. SRCDIR=/Users/johnsonhj/src/jsoncpp/ #My local SRC BLDDIR=/Users/johnsonhj/src/jsoncpp/cmake-build-debug/ #My local BLD cd /Users/johnsonhj/src/jsoncpp/cmake-build-debug/ run-clang-tidy.py -extra-arg=-D__clang__ -checks=-*,modernize-use-default-member-init -header-filter=.* -fix
This commit is contained in:

committed by
Hans Johnson

parent
b5093e8122
commit
e817e4fc25
@@ -74,7 +74,7 @@ namespace JsonTest {
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
|
||||
TestResult::TestResult()
|
||||
: predicateId_(1), lastUsedPredicateId_(0), messageTarget_(nullptr) {
|
||||
{
|
||||
// The root predicate has id 0
|
||||
rootPredicateNode_.id_ = 0;
|
||||
rootPredicateNode_.next_ = nullptr;
|
||||
@@ -205,7 +205,7 @@ TestResult& TestResult::operator<<(bool value) {
|
||||
// class TestCase
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
|
||||
TestCase::TestCase() : result_(nullptr) {}
|
||||
TestCase::TestCase() {}
|
||||
|
||||
TestCase::~TestCase() {}
|
||||
|
||||
|
Reference in New Issue
Block a user