mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Attempt to account for gcc differences.
This commit is contained in:
parent
787cef1386
commit
3a46512b7f
@ -42,7 +42,9 @@
|
||||
#include "refcollection.hpp"
|
||||
#include "infocollection.hpp"
|
||||
#include "pathgrid.hpp"
|
||||
#ifndef Q_MOC_RUN
|
||||
#include "subcellcollection.hpp"
|
||||
#endif
|
||||
|
||||
class QAbstractItemModel;
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace CSMWorld
|
||||
{
|
||||
ESXRecordT pathgrid = record.get();
|
||||
|
||||
ESXRecordT::PointList& points = pathgrid.mPoints;
|
||||
ESM::Pathgrid::PointList& points = pathgrid.mPoints;
|
||||
|
||||
// blank row
|
||||
ESM::Pathgrid::Point point;
|
||||
@ -43,7 +43,7 @@ namespace CSMWorld
|
||||
{
|
||||
ESXRecordT pathgrid = record.get();
|
||||
|
||||
ESXRecordT::PointList& points = pathgrid.mPoints;
|
||||
ESM::Pathgrid::PointList& points = pathgrid.mPoints;
|
||||
|
||||
if (rowToRemove < 0 || rowToRemove >= static_cast<int> (points.size()))
|
||||
throw std::runtime_error ("index out of range");
|
||||
@ -58,13 +58,13 @@ namespace CSMWorld
|
||||
virtual void setNestedTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable)
|
||||
{
|
||||
record.get().mPoints =
|
||||
static_cast<const NestedTableWrapper<ESXRecordT::PointList> &>(nestedTable).mNestedTable;
|
||||
static_cast<const NestedTableWrapper<ESM::Pathgrid::PointList> &>(nestedTable).mNestedTable;
|
||||
}
|
||||
|
||||
virtual NestedTableWrapperBase* nestedTable(const Record<ESXRecordT>& record) const
|
||||
{
|
||||
// deleted by dtor of NestedTableStoring
|
||||
return new NestedTableWrapper<ESXRecordT::PointList>(record.get().mPoints);
|
||||
return new NestedTableWrapper<ESM::Pathgrid::PointList>(record.get().mPoints);
|
||||
}
|
||||
|
||||
virtual QVariant getNestedData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const
|
||||
@ -119,7 +119,7 @@ namespace CSMWorld
|
||||
{
|
||||
ESXRecordT pathgrid = record.get();
|
||||
|
||||
ESXRecordT::EdgeList& edges = pathgrid.mEdges;
|
||||
ESM::Pathgrid::EdgeList& edges = pathgrid.mEdges;
|
||||
|
||||
// blank row
|
||||
ESM::Pathgrid::Edge edge;
|
||||
@ -137,7 +137,7 @@ namespace CSMWorld
|
||||
{
|
||||
ESXRecordT pathgrid = record.get();
|
||||
|
||||
ESXRecordT::EdgeList& edges = pathgrid.mEdges;
|
||||
ESM::Pathgrid::EdgeList& edges = pathgrid.mEdges;
|
||||
|
||||
if (rowToRemove < 0 || rowToRemove >= static_cast<int> (edges.size()))
|
||||
throw std::runtime_error ("index out of range");
|
||||
@ -150,13 +150,13 @@ namespace CSMWorld
|
||||
virtual void setNestedTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable)
|
||||
{
|
||||
record.get().mEdges =
|
||||
static_cast<const NestedTableWrapper<ESXRecordT::EdgeList> &>(nestedTable).mNestedTable;
|
||||
static_cast<const NestedTableWrapper<ESM::Pathgrid::EdgeList> &>(nestedTable).mNestedTable;
|
||||
}
|
||||
|
||||
virtual NestedTableWrapperBase* nestedTable(const Record<ESXRecordT>& record) const
|
||||
{
|
||||
// deleted by dtor of NestedTableStoring
|
||||
return new NestedTableWrapper<ESXRecordT::EdgeList>(record.get().mEdges);
|
||||
return new NestedTableWrapper<ESM::Pathgrid::EdgeList>(record.get().mEdges);
|
||||
}
|
||||
|
||||
virtual QVariant getNestedData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const
|
||||
|
@ -76,7 +76,7 @@ namespace CSMWorld
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
SubCellCollection<ESXRecordT, IdAccessorT>::~SubCellCollection()
|
||||
{
|
||||
for (std::map<const ColumnBase *, NestedIdAdapter<ESXRecordT>* >::iterator iter (mAdapters.begin());
|
||||
for (typename std::map<const ColumnBase *, NestedIdAdapter<ESXRecordT>* >::iterator iter (mAdapters.begin());
|
||||
iter!=mAdapters.end(); ++iter)
|
||||
delete (*iter).second;
|
||||
}
|
||||
@ -90,7 +90,7 @@ namespace CSMWorld
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
NestedIdAdapter<ESXRecordT>* SubCellCollection<ESXRecordT, IdAccessorT>::getAdapter(const ColumnBase &column) const
|
||||
{
|
||||
std::map<const ColumnBase *, NestedIdAdapter<ESXRecordT>* >::const_iterator iter =
|
||||
typename std::map<const ColumnBase *, NestedIdAdapter<ESXRecordT>* >::const_iterator iter =
|
||||
mAdapters.find (&column);
|
||||
|
||||
if (iter==mAdapters.end())
|
||||
@ -102,59 +102,59 @@ namespace CSMWorld
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
void SubCellCollection<ESXRecordT, IdAccessorT>::addNestedRow(int row, int column, int position)
|
||||
{
|
||||
getAdapter(getColumn(column))->addNestedRow(getRecord(row), position);
|
||||
getAdapter(Collection<ESXRecordT, IdAccessorT>::getColumn(column))->addNestedRow(getRecord(row), position);
|
||||
}
|
||||
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
void SubCellCollection<ESXRecordT, IdAccessorT>::removeNestedRows(int row, int column, int subRow)
|
||||
{
|
||||
getAdapter(getColumn(column))->removeNestedRow(getRecord(row), subRow);
|
||||
getAdapter(Collection<ESXRecordT, IdAccessorT>::getColumn(column))->removeNestedRow(getRecord(row), subRow);
|
||||
}
|
||||
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
QVariant SubCellCollection<ESXRecordT, IdAccessorT>::getNestedData (int row,
|
||||
int column, int subRow, int subColumn) const
|
||||
{
|
||||
return getAdapter(getColumn(column))->getNestedData(getRecord(row), subRow, subColumn);
|
||||
return getAdapter(Collection<ESXRecordT, IdAccessorT>::getColumn(column))->getNestedData(getRecord(row), subRow, subColumn);
|
||||
}
|
||||
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
void SubCellCollection<ESXRecordT, IdAccessorT>::setNestedData(int row,
|
||||
int column, const QVariant& data, int subRow, int subColumn)
|
||||
{
|
||||
getAdapter(getColumn(column))->setNestedData(getRecord(row), data, subRow, subColumn);
|
||||
getAdapter(Collection<ESXRecordT, IdAccessorT>::getColumn(column))->setNestedData(getRecord(row), data, subRow, subColumn);
|
||||
}
|
||||
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
CSMWorld::NestedTableWrapperBase* SubCellCollection<ESXRecordT, IdAccessorT>::nestedTable(int row,
|
||||
int column) const
|
||||
{
|
||||
return getAdapter(getColumn(column))->nestedTable(getRecord(row));
|
||||
return getAdapter(Collection<ESXRecordT, IdAccessorT>::getColumn(column))->nestedTable(getRecord(row));
|
||||
}
|
||||
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
void SubCellCollection<ESXRecordT, IdAccessorT>::setNestedTable(int row,
|
||||
int column, const CSMWorld::NestedTableWrapperBase& nestedTable)
|
||||
{
|
||||
getAdapter(getColumn(column))->setNestedTable(getRecord(row), nestedTable);
|
||||
getAdapter(Collection<ESXRecordT, IdAccessorT>::getColumn(column))->setNestedTable(getRecord(row), nestedTable);
|
||||
}
|
||||
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
int SubCellCollection<ESXRecordT, IdAccessorT>::getNestedRowsCount(int row, int column) const
|
||||
{
|
||||
return getAdapter(getColumn(column))->getNestedRowsCount(getRecord(row));
|
||||
return getAdapter(Collection<ESXRecordT, IdAccessorT>::getColumn(column))->getNestedRowsCount(getRecord(row));
|
||||
}
|
||||
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
int SubCellCollection<ESXRecordT, IdAccessorT>::getNestedColumnsCount(int row, int column) const
|
||||
{
|
||||
return getAdapter(getColumn(column))->getNestedColumnsCount(getRecord(row));
|
||||
return getAdapter(Collection<ESXRecordT, IdAccessorT>::getColumn(column))->getNestedColumnsCount(getRecord(row));
|
||||
}
|
||||
|
||||
template<typename ESXRecordT, typename IdAccessorT>
|
||||
CSMWorld::NestableColumn *SubCellCollection<ESXRecordT, IdAccessorT>::getNestableColumn(int column)
|
||||
{
|
||||
return Collection::getNestableColumn(column);
|
||||
return Collection<ESXRecordT, IdAccessorT>::getNestableColumn(column);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user