forked from mirror/openmw-tes3mp
Moved removeNestedRow responsibility to the helper.
This commit is contained in:
parent
c018ca43ac
commit
427d6efd19
2 changed files with 8 additions and 5 deletions
|
@ -61,6 +61,13 @@ namespace CSMWorld
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void removeNestedRow (const RefIdColumn *column, RefIdData& data, int index, int rowToRemove) const
|
||||||
|
{
|
||||||
|
std::vector<ESM::ContItem>& list = getRecord(data, index).get().mInventory.mList;
|
||||||
|
|
||||||
|
list.erase (list.begin () + rowToRemove);
|
||||||
|
}
|
||||||
|
|
||||||
void setNestedData (const RefIdColumn *column,
|
void setNestedData (const RefIdColumn *column,
|
||||||
RefIdData& data,
|
RefIdData& data,
|
||||||
int index,
|
int index,
|
||||||
|
|
|
@ -227,11 +227,7 @@ void CSMWorld::ContainerRefIdAdapter::removeNestedRow (const RefIdColumn *column
|
||||||
{
|
{
|
||||||
throw std::logic_error("This column does not hold multiple values.");
|
throw std::logic_error("This column does not hold multiple values.");
|
||||||
}
|
}
|
||||||
|
mHelper.removeNestedRow(column, data, index, rowToRemove);
|
||||||
std::vector<ESM::ContItem>& list = static_cast<Record<ESM::Container>&> (
|
|
||||||
data.getRecord (RefIdData::LocalIndex (index, UniversalId::Type_Container))).get().mInventory.mList;
|
|
||||||
|
|
||||||
list.erase (list.begin () + rowToRemove);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMWorld::ContainerRefIdAdapter::addNestedRow (const RefIdColumn *column, RefIdData& data, int index, int position) const
|
void CSMWorld::ContainerRefIdAdapter::addNestedRow (const RefIdColumn *column, RefIdData& data, int index, int position) const
|
||||||
|
|
Loading…
Reference in a new issue