Simplify CollectionData to work only with VariantSlot*

This commit is contained in:
Benoit Blanchon
2023-04-17 11:57:19 +02:00
parent 003087406c
commit f5e7570f84
12 changed files with 41 additions and 74 deletions

View File

@ -203,12 +203,12 @@ class JsonObject : public detail::VariantOperators<JsonObject> {
inline detail::VariantData* getMember(TAdaptedString key) const {
if (!_data)
return 0;
return _data->getMember(key);
return slotData(_data->get(key));
}
template <typename TAdaptedString>
void removeMember(TAdaptedString key) const {
collectionRemove(_data, _data->getSlot(key), _pool);
collectionRemove(_data, _data->get(key), _pool);
}
detail::CollectionData* _data;