fixed a cppcheck warning

pull/5/head
Niels 2013-12-10 12:44:23 +01:00
parent a8f62ca052
commit 81367a9a10
1 changed files with 2 additions and 4 deletions

View File

@ -614,8 +614,7 @@ JSON::iterator JSON::find(const char* key) {
} else {
const object_t::iterator i = _value.object->find(key);
if (i != _value.object->end()) {
JSON::iterator result;
result._object = this;
JSON::iterator result(this);
result._oi = new object_t::iterator(i);
return result;
} else {
@ -630,8 +629,7 @@ JSON::const_iterator JSON::find(const char* key) const {
} else {
const object_t::const_iterator i = _value.object->find(key);
if (i != _value.object->end()) {
JSON::const_iterator result;
result._object = this;
JSON::const_iterator result(this);
result._oi = new object_t::const_iterator(i);
return result;
} else {