File tree 8 files changed +20
-20
lines changed
8 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ class JSON_API Reader {
256
256
*/
257
257
class JSON_API CharReader {
258
258
public:
259
- virtual ~CharReader () {}
259
+ virtual ~CharReader () = default ;
260
260
/* * \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
261
261
document.
262
262
* The document must be a UTF-8 encoded string containing the document to
@@ -282,7 +282,7 @@ class JSON_API CharReader {
282
282
283
283
class JSON_API Factory {
284
284
public:
285
- virtual ~Factory () {}
285
+ virtual ~Factory () = default ;
286
286
/* * \brief Allocate a CharReader via operator new().
287
287
* \throw std::exception if something goes wrong (e.g. invalid settings)
288
288
*/
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API FastWriter
169
169
: public Writer {
170
170
public:
171
171
FastWriter ();
172
- ~FastWriter () override {}
172
+ ~FastWriter () override = default ;
173
173
174
174
void enableYAMLCompatibility ();
175
175
@@ -229,7 +229,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API
229
229
StyledWriter : public Writer {
230
230
public:
231
231
StyledWriter ();
232
- ~StyledWriter () override {}
232
+ ~StyledWriter () override = default ;
233
233
234
234
public: // overridden from Writer
235
235
/* * \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;
60
60
// ////////////////////////////////
61
61
62
62
Features::Features ()
63
- {}
63
+ = default ;
64
64
65
65
Features Features::all () { return {}; }
66
66
@@ -1907,7 +1907,7 @@ class OurCharReader : public CharReader {
1907
1907
};
1908
1908
1909
1909
CharReaderBuilder::CharReaderBuilder () { setDefaults (&settings_); }
1910
- CharReaderBuilder::~CharReaderBuilder () {}
1910
+ CharReaderBuilder::~CharReaderBuilder () = default ;
1911
1911
CharReader* CharReaderBuilder::newCharReader () const {
1912
1912
bool collectComments = settings_[" collectComments" ].asBool ();
1913
1913
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) {
233
233
// //////////////////////////////////////////////////////////////////
234
234
// //////////////////////////////////////////////////////////////////
235
235
236
- Value::CommentInfo::CommentInfo () {}
236
+ Value::CommentInfo::CommentInfo () = default ;
237
237
238
238
Value::CommentInfo::~CommentInfo () {
239
239
if (comment_)
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ char const* ValueIteratorBase::memberName(char const** end) const {
123
123
// //////////////////////////////////////////////////////////////////
124
124
// //////////////////////////////////////////////////////////////////
125
125
126
- ValueConstIterator::ValueConstIterator () {}
126
+ ValueConstIterator::ValueConstIterator () = default ;
127
127
128
128
ValueConstIterator::ValueConstIterator (
129
129
const Value::ObjectValues::iterator& current)
@@ -146,7 +146,7 @@ operator=(const ValueIteratorBase& other) {
146
146
// //////////////////////////////////////////////////////////////////
147
147
// //////////////////////////////////////////////////////////////////
148
148
149
- ValueIterator::ValueIterator () {}
149
+ ValueIterator::ValueIterator () = default ;
150
150
151
151
ValueIterator::ValueIterator (const Value::ObjectValues::iterator& current)
152
152
: ValueIteratorBase(current) {}
@@ -157,7 +157,7 @@ ValueIterator::ValueIterator(const ValueConstIterator& other)
157
157
}
158
158
159
159
ValueIterator::ValueIterator (const ValueIterator& other)
160
- : ValueIteratorBase(other) {}
160
+ = default ;
161
161
162
162
ValueIterator& ValueIterator::operator =(const SelfType& other) {
163
163
copy (other);
Original file line number Diff line number Diff line change @@ -346,14 +346,14 @@ JSONCPP_STRING valueToQuotedString(const char* value) {
346
346
347
347
// Class Writer
348
348
// //////////////////////////////////////////////////////////////////
349
- Writer::~Writer () {}
349
+ Writer::~Writer () = default ;
350
350
351
351
// Class FastWriter
352
352
// //////////////////////////////////////////////////////////////////
353
353
354
354
FastWriter::FastWriter ()
355
355
356
- {}
356
+ = default ;
357
357
358
358
void FastWriter::enableYAMLCompatibility () { yamlCompatibilityEnabled_ = true ; }
359
359
@@ -428,7 +428,7 @@ void FastWriter::writeValue(const Value& value) {
428
428
// //////////////////////////////////////////////////////////////////
429
429
430
430
StyledWriter::StyledWriter ()
431
- {}
431
+ = default ;
432
432
433
433
JSONCPP_STRING StyledWriter::write (const Value& root) {
434
434
document_.clear ();
@@ -1156,10 +1156,10 @@ bool BuiltStyledStreamWriter::hasCommentForValue(const Value& value) {
1156
1156
// StreamWriter
1157
1157
1158
1158
StreamWriter::StreamWriter () : sout_(nullptr ) {}
1159
- StreamWriter::~StreamWriter () {}
1160
- StreamWriter::Factory::~Factory () {}
1159
+ StreamWriter::~StreamWriter () = default ;
1160
+ StreamWriter::Factory::~Factory () = default ;
1161
1161
StreamWriterBuilder::StreamWriterBuilder () { setDefaults (&settings_); }
1162
- StreamWriterBuilder::~StreamWriterBuilder () {}
1162
+ StreamWriterBuilder::~StreamWriterBuilder () = default ;
1163
1163
StreamWriter* StreamWriterBuilder::newStreamWriter () const {
1164
1164
JSONCPP_STRING indentation = settings_[" indentation" ].asString ();
1165
1165
JSONCPP_STRING cs_str = settings_[" commentStyle" ].asString ();
Original file line number Diff line number Diff line change @@ -205,9 +205,9 @@ TestResult& TestResult::operator<<(bool value) {
205
205
// class TestCase
206
206
// //////////////////////////////////////////////////////////////////
207
207
208
- TestCase::TestCase () {}
208
+ TestCase::TestCase () = default ;
209
209
210
- TestCase::~TestCase () {}
210
+ TestCase::~TestCase () = default ;
211
211
212
212
void TestCase::run (TestResult& result) {
213
213
result_ = &result;
@@ -217,7 +217,7 @@ void TestCase::run(TestResult& result) {
217
217
// class Runner
218
218
// //////////////////////////////////////////////////////////////////
219
219
220
- Runner::Runner () {}
220
+ Runner::Runner () = default ;
221
221
222
222
Runner& Runner::add (TestCaseFactory factory) {
223
223
tests_.push_back (factory);
Original file line number Diff line number Diff line change @@ -1332,7 +1332,7 @@ void ValueTest::checkMemberCount(Json::Value& value,
1332
1332
1333
1333
ValueTest::IsCheck::IsCheck ()
1334
1334
1335
- {}
1335
+ = default;
1336
1336
1337
1337
void ValueTest::checkIs (const Json::Value& value, const IsCheck& check) {
1338
1338
JSONTEST_ASSERT_EQUAL (check.isObject_ , value.isObject ());
You can’t perform that action at this time.
0 commit comments