mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 22:53:54 +00:00
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,
|
||||
RefIdData& data,
|
||||
int index,
|
||||
|
|
|
@ -227,11 +227,7 @@ void CSMWorld::ContainerRefIdAdapter::removeNestedRow (const RefIdColumn *column
|
|||
{
|
||||
throw std::logic_error("This column does not hold multiple values.");
|
||||
}
|
||||
|
||||
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);
|
||||
mHelper.removeNestedRow(column, data, index, rowToRemove);
|
||||
}
|
||||
|
||||
void CSMWorld::ContainerRefIdAdapter::addNestedRow (const RefIdColumn *column, RefIdData& data, int index, int position) const
|
||||
|
|
Loading…
Reference in a new issue