Skip to content

Commit

Permalink
Minor changes for static analysis (open-source-parsers#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdunn2001 authored Mar 3, 2018
1 parent 1ab310e commit 3e2b8ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib_json/json_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ void Value::resize(ArrayIndex newSize) {
if (newSize == 0)
clear();
else if (newSize > oldSize)
(*this)[newSize - 1];
this->operator[](newSize - 1);
else {
for (ArrayIndex index = newSize; index < oldSize; ++index) {
value_.map_->erase(index);
Expand Down
3 changes: 2 additions & 1 deletion src/lib_json/json_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,8 @@ bool StyledWriter::hasCommentForValue(const Value& value) {

StyledStreamWriter::StyledStreamWriter(JSONCPP_STRING indentation)
: document_(NULL), rightMargin_(74), indentation_(indentation),
addChildValues_() {}
addChildValues_(), indented_(false)
{}

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

0 comments on commit 3e2b8ea

Please sign in to comment.