1
0

Update Loops required for JsonCPP

This commit is contained in:
Lukas Pioch
2015-10-19 16:03:55 +02:00
committed by tycho
parent 7761f7e5b8
commit 079bb7c016
4 changed files with 12 additions and 12 deletions

View File

@@ -75,10 +75,10 @@ void cEnderChestEntity::OpenNewWindow()
void cEnderChestEntity::LoadFromJson(const Json::Value & a_Value, cItemGrid & a_Grid)
{
int SlotIdx = 0;
for (Json::Value::iterator itr = a_Value.begin(); itr != a_Value.end(); ++itr)
for (auto & Node : a_Value)
{
cItem Item;
Item.FromJson(*itr);
Item.FromJson(Node);
a_Grid.SetSlot(SlotIdx, Item);
SlotIdx++;
}