mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-16 07:23:43 +02:00
COMP: Improve const correctness for ValueIterators (#1056)
The protected deref method had inconsistent interface of being a const function that returned a non-const reference. Resolves #914.
This commit is contained in:

committed by
Jordan Bayles

parent
a955529e47
commit
b082693b9e
@@ -21,7 +21,8 @@ ValueIteratorBase::ValueIteratorBase(
|
||||
const Value::ObjectValues::iterator& current)
|
||||
: current_(current), isNull_(false) {}
|
||||
|
||||
Value& ValueIteratorBase::deref() const { return current_->second; }
|
||||
Value& ValueIteratorBase::deref() { return current_->second; }
|
||||
const Value& ValueIteratorBase::deref() const { return current_->second; }
|
||||
|
||||
void ValueIteratorBase::increment() { ++current_; }
|
||||
|
||||
|
Reference in New Issue
Block a user