File tree Expand file tree Collapse file tree 8 files changed +21
-21
lines changed Expand file tree Collapse file tree 8 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ class JSON_API Reader {
256256 */
257257class JSON_API CharReader {
258258public:
259- virtual ~CharReader () {}
259+ virtual ~CharReader () = default ;
260260 /* * \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
261261 document.
262262 * The document must be a UTF-8 encoded string containing the document to
@@ -282,7 +282,7 @@ class JSON_API CharReader {
282282
283283 class JSON_API Factory {
284284 public:
285- virtual ~Factory () {}
285+ virtual ~Factory () = default ;
286286 /* * \brief Allocate a CharReader via operator new().
287287 * \throw std::exception if something goes wrong (e.g. invalid settings)
288288 */
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API FastWriter
169169 : public Writer {
170170public:
171171 FastWriter ();
172- ~FastWriter () override {}
172+ ~FastWriter () override = default ;
173173
174174 void enableYAMLCompatibility ();
175175
@@ -229,7 +229,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API
229229 StyledWriter : public Writer {
230230public:
231231 StyledWriter ();
232- ~StyledWriter () override {}
232+ ~StyledWriter () override = default ;
233233
234234public: // overridden from Writer
235235 /* * \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
@@ -301,7 +301,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API
301301 * \param indentation Each level will be indented by this amount extra.
302302 */
303303 StyledStreamWriter (JSONCPP_STRING indentation = " \t " );
304- ~StyledStreamWriter () {}
304+ ~StyledStreamWriter () = default ;
305305
306306public:
307307 /* * \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ typedef std::auto_ptr<CharReader> CharReaderPtr;
6060// ////////////////////////////////
6161
6262Features::Features ()
63- {}
63+ = default ;
6464
6565Features Features::all () { return {}; }
6666
@@ -1907,7 +1907,7 @@ class OurCharReader : public CharReader {
19071907};
19081908
19091909CharReaderBuilder::CharReaderBuilder () { setDefaults (&settings_); }
1910- CharReaderBuilder::~CharReaderBuilder () {}
1910+ CharReaderBuilder::~CharReaderBuilder () = default ;
19111911CharReader* CharReaderBuilder::newCharReader () const {
19121912 bool collectComments = settings_[" collectComments" ].asBool ();
19131913 OurFeatures features = OurFeatures::all ();
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ JSONCPP_NORETURN void throwLogicError(JSONCPP_STRING const& msg) {
233233// //////////////////////////////////////////////////////////////////
234234// //////////////////////////////////////////////////////////////////
235235
236- Value::CommentInfo::CommentInfo () {}
236+ Value::CommentInfo::CommentInfo () = default ;
237237
238238Value::CommentInfo::~CommentInfo () {
239239 if (comment_)
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ char const* ValueIteratorBase::memberName(char const** end) const {
123123// //////////////////////////////////////////////////////////////////
124124// //////////////////////////////////////////////////////////////////
125125
126- ValueConstIterator::ValueConstIterator () {}
126+ ValueConstIterator::ValueConstIterator () = default ;
127127
128128ValueConstIterator::ValueConstIterator (
129129 const Value::ObjectValues::iterator& current)
@@ -146,7 +146,7 @@ operator=(const ValueIteratorBase& other) {
146146// //////////////////////////////////////////////////////////////////
147147// //////////////////////////////////////////////////////////////////
148148
149- ValueIterator::ValueIterator () {}
149+ ValueIterator::ValueIterator () = default ;
150150
151151ValueIterator::ValueIterator (const Value::ObjectValues::iterator& current)
152152 : ValueIteratorBase(current) {}
@@ -157,7 +157,7 @@ ValueIterator::ValueIterator(const ValueConstIterator& other)
157157}
158158
159159ValueIterator::ValueIterator (const ValueIterator& other)
160- : ValueIteratorBase(other) {}
160+ = default ;
161161
162162ValueIterator& ValueIterator::operator =(const SelfType& other) {
163163 copy (other);
Original file line number Diff line number Diff line change @@ -346,14 +346,14 @@ JSONCPP_STRING valueToQuotedString(const char* value) {
346346
347347// Class Writer
348348// //////////////////////////////////////////////////////////////////
349- Writer::~Writer () {}
349+ Writer::~Writer () = default ;
350350
351351// Class FastWriter
352352// //////////////////////////////////////////////////////////////////
353353
354354FastWriter::FastWriter ()
355355
356- {}
356+ = default ;
357357
358358void FastWriter::enableYAMLCompatibility () { yamlCompatibilityEnabled_ = true ; }
359359
@@ -428,7 +428,7 @@ void FastWriter::writeValue(const Value& value) {
428428// //////////////////////////////////////////////////////////////////
429429
430430StyledWriter::StyledWriter ()
431- {}
431+ = default ;
432432
433433JSONCPP_STRING StyledWriter::write (const Value& root) {
434434 document_.clear ();
@@ -1156,10 +1156,10 @@ bool BuiltStyledStreamWriter::hasCommentForValue(const Value& value) {
11561156// StreamWriter
11571157
11581158StreamWriter::StreamWriter () : sout_(nullptr ) {}
1159- StreamWriter::~StreamWriter () {}
1160- StreamWriter::Factory::~Factory () {}
1159+ StreamWriter::~StreamWriter () = default ;
1160+ StreamWriter::Factory::~Factory () = default ;
11611161StreamWriterBuilder::StreamWriterBuilder () { setDefaults (&settings_); }
1162- StreamWriterBuilder::~StreamWriterBuilder () {}
1162+ StreamWriterBuilder::~StreamWriterBuilder () = default ;
11631163StreamWriter* StreamWriterBuilder::newStreamWriter () const {
11641164 JSONCPP_STRING indentation = settings_[" indentation" ].asString ();
11651165 JSONCPP_STRING cs_str = settings_[" commentStyle" ].asString ();
Original file line number Diff line number Diff line change @@ -207,9 +207,9 @@ TestResult& TestResult::operator<<(bool value) {
207207// class TestCase
208208// //////////////////////////////////////////////////////////////////
209209
210- TestCase::TestCase () {}
210+ TestCase::TestCase () = default ;
211211
212- TestCase::~TestCase () {}
212+ TestCase::~TestCase () = default ;
213213
214214void TestCase::run (TestResult& result) {
215215 result_ = &result;
@@ -219,7 +219,7 @@ void TestCase::run(TestResult& result) {
219219// class Runner
220220// //////////////////////////////////////////////////////////////////
221221
222- Runner::Runner () {}
222+ Runner::Runner () = default ;
223223
224224Runner& Runner::add (TestCaseFactory factory) {
225225 tests_.push_back (factory);
Original file line number Diff line number Diff line change @@ -1332,7 +1332,7 @@ void ValueTest::checkMemberCount(Json::Value& value,
13321332
13331333ValueTest::IsCheck::IsCheck ()
13341334
1335- {}
1335+ = default;
13361336
13371337void ValueTest::checkIs (const Json::Value& value, const IsCheck& check) {
13381338 JSONTEST_ASSERT_EQUAL (check.isObject_ , value.isObject ());
You can’t perform that action at this time.
0 commit comments