Fixed failing test

This commit is contained in:
Benoit Blanchon committed 2014-07-31 18:50:01 +02:00
1 parent 1ce6661fa6
commit 85ffb83aa6
3 files changed
+32 -9

No files matched your search

+17
View File
@@ -33,4 +33,21 @@ size_t JsonObjectBase::printTo(Print& p) const
n += p.write('}');
return n;
}
JsonObjectBase::KeyValuePair* JsonObjectBase::getMatchingPair(char const* key)
{
for (int i = 0; i < count; ++i)
{
if (items[i].key.equals(key))
{
return &items[i];
}
}
if (count >= capacity) return 0;
KeyValuePair* p = &items[count++];
p->key.set(key);
return p;
}