Skip to content

Commit 2e625dd

Browse files
committed
Merge pull request open-source-parsers#364 from ya1gaurav/patch-28
Have default ctor for OurFeatures
2 parents 5721f1c + 83ea25e commit 2e625dd

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/lib_json/json_reader.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ bool Reader::good() const {
889889
class OurFeatures {
890890
public:
891891
static OurFeatures all();
892-
OurFeatures();
892+
OurFeatures() = default;
893893
bool allowComments_;
894894
bool strictRoot_;
895895
bool allowDroppedNullPlaceholders_;
@@ -904,15 +904,6 @@ class OurFeatures {
904904
// exact copy of Implementation of class Features
905905
// ////////////////////////////////
906906

907-
OurFeatures::OurFeatures()
908-
: allowComments_(true), strictRoot_(false)
909-
, allowDroppedNullPlaceholders_(false), allowNumericKeys_(false)
910-
, allowSingleQuotes_(false)
911-
, failIfExtra_(false)
912-
, allowSpecialFloats_(false)
913-
{
914-
}
915-
916907
OurFeatures OurFeatures::all() { return OurFeatures(); }
917908

918909
// Implementation of class Reader
@@ -1979,6 +1970,7 @@ void CharReaderBuilder::strictMode(Json::Value* settings)
19791970
(*settings)["allowDroppedNullPlaceholders"] = false;
19801971
(*settings)["allowNumericKeys"] = false;
19811972
(*settings)["allowSingleQuotes"] = false;
1973+
(*settings)["stackLimit"] = 1000;
19821974
(*settings)["failIfExtra"] = true;
19831975
(*settings)["rejectDupKeys"] = true;
19841976
(*settings)["allowSpecialFloats"] = false;

0 commit comments

Comments
 (0)