Skip to content

Commit aadd0b1

Browse files
ya1gauravcdunn2001
authored andcommitted
1 parent 3ee15b7 commit aadd0b1

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

include/json/reader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
333333
Json::Value settings_;
334334

335335
CharReaderBuilder();
336-
virtual ~CharReaderBuilder();
336+
~CharReaderBuilder() override;
337337

338-
virtual CharReader* newCharReader() const;
338+
CharReader* newCharReader() const override;
339339

340340
/** \return true if 'settings' are legal and consistent;
341341
* otherwise, indicate bad settings via 'invalid'.

include/json/value.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ namespace Json {
4040
class JSON_API Exception : public std::exception {
4141
public:
4242
Exception(std::string const& msg);
43-
virtual ~Exception() throw();
44-
virtual char const* what() const throw();
43+
~Exception() throw() override;
44+
char const* what() const throw() override;
4545
protected:
4646
std::string const msg_;
4747
};

include/json/writer.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ class JSON_API StreamWriterBuilder : public StreamWriter::Factory {
112112
Json::Value settings_;
113113

114114
StreamWriterBuilder();
115-
virtual ~StreamWriterBuilder();
115+
~StreamWriterBuilder() override;
116116

117117
/**
118118
* \throw std::exception if something goes wrong (e.g. invalid settings)
119119
*/
120-
virtual StreamWriter* newStreamWriter() const;
120+
StreamWriter* newStreamWriter() const override;
121121

122122
/** \return true if 'settings' are legal and consistent;
123123
* otherwise, indicate bad settings via 'invalid'.
@@ -158,7 +158,7 @@ class JSON_API FastWriter : public Writer {
158158

159159
public:
160160
FastWriter();
161-
virtual ~FastWriter() {}
161+
~FastWriter() override {}
162162

163163
void enableYAMLCompatibility();
164164

@@ -172,7 +172,7 @@ class JSON_API FastWriter : public Writer {
172172
void omitEndingLineFeed();
173173

174174
public: // overridden from Writer
175-
virtual std::string write(const Value& root);
175+
std::string write(const Value& root) override;
176176

177177
private:
178178
void writeValue(const Value& value);
@@ -210,14 +210,14 @@ class JSON_API FastWriter : public Writer {
210210
class JSON_API StyledWriter : public Writer {
211211
public:
212212
StyledWriter();
213-
virtual ~StyledWriter() {}
213+
~StyledWriter() override {}
214214

215215
public: // overridden from Writer
216216
/** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
217217
* \param root Value to serialize.
218218
* \return String containing the JSON document that represents the root value.
219219
*/
220-
virtual std::string write(const Value& root);
220+
std::string write(const Value& root) override;
221221

222222
private:
223223
void writeValue(const Value& value);

src/lib_json/json_reader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,9 +1903,9 @@ class OurCharReader : public CharReader {
19031903
: collectComments_(collectComments)
19041904
, reader_(features)
19051905
{}
1906-
virtual bool parse(
1906+
bool parse(
19071907
char const* beginDoc, char const* endDoc,
1908-
Value* root, std::string* errs) {
1908+
Value* root, std::string* errs) override {
19091909
bool ok = reader_.parse(beginDoc, endDoc, *root, collectComments_);
19101910
if (errs) {
19111911
*errs = reader_.getFormattedErrorMessages();

src/lib_json/json_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ struct BuiltStyledStreamWriter : public StreamWriter
816816
std::string const& nullSymbol,
817817
std::string const& endingLineFeedSymbol,
818818
bool useSpecialFloats);
819-
virtual int write(Value const& root, std::ostream* sout);
819+
int write(Value const& root, std::ostream* sout) override;
820820
private:
821821
void writeValue(Value const& value);
822822
void writeArrayValue(Value const& value);

src/test_lib_json/jsontest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ TestResult& checkStringEqual(TestResult& result,
265265
} \
266266
\
267267
public: /* overidden from TestCase */ \
268-
virtual const char* testName() const { return #FixtureType "/" #name; } \
269-
virtual void runTestCase(); \
268+
const char* testName() const override { return #FixtureType "/" #name; } \
269+
void runTestCase() override; \
270270
}; \
271271
\
272272
void Test##FixtureType##name::runTestCase()

0 commit comments

Comments
 (0)