mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 16:19:54 +00:00
67bd6cd708
git ls-files -z | xargs -0 sed -i '1{/^$/d}'
30 lines
618 B
C++
30 lines
618 B
C++
#include "collectionbase.hpp"
|
|
|
|
#include <stdexcept>
|
|
|
|
#include "columnbase.hpp"
|
|
|
|
CSMWorld::CollectionBase::CollectionBase() {}
|
|
|
|
CSMWorld::CollectionBase::~CollectionBase() {}
|
|
|
|
int CSMWorld::CollectionBase::searchColumnIndex (Columns::ColumnId id) const
|
|
{
|
|
int columns = getColumns();
|
|
|
|
for (int i=0; i<columns; ++i)
|
|
if (getColumn (i).mColumnId==id)
|
|
return i;
|
|
|
|
return -1;
|
|
}
|
|
|
|
int CSMWorld::CollectionBase::findColumnIndex (Columns::ColumnId id) const
|
|
{
|
|
int index = searchColumnIndex (id);
|
|
|
|
if (index==-1)
|
|
throw std::logic_error ("invalid column index");
|
|
|
|
return index;
|
|
}
|