Skip to content

Commit 3e2b8ea

Browse files
authored
Minor changes for static analysis (open-source-parsers#749)
re: open-source-parsers#747
1 parent 1ab310e commit 3e2b8ea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/lib_json/json_value.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ void Value::resize(ArrayIndex newSize) {
931931
if (newSize == 0)
932932
clear();
933933
else if (newSize > oldSize)
934-
(*this)[newSize - 1];
934+
this->operator[](newSize - 1);
935935
else {
936936
for (ArrayIndex index = newSize; index < oldSize; ++index) {
937937
value_.map_->erase(index);

src/lib_json/json_writer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,8 @@ bool StyledWriter::hasCommentForValue(const Value& value) {
623623

624624
StyledStreamWriter::StyledStreamWriter(JSONCPP_STRING indentation)
625625
: document_(NULL), rightMargin_(74), indentation_(indentation),
626-
addChildValues_() {}
626+
addChildValues_(), indented_(false)
627+
{}
627628

628629
void StyledStreamWriter::write(JSONCPP_OSTREAM& out, const Value& root) {
629630
document_ = &out;

0 commit comments

Comments
 (0)