From 3a46512b7f22b52bc8e276b86c6f8102ae48c1cc Mon Sep 17 00:00:00 2001 From: cc9cii Date: Thu, 9 Apr 2015 20:15:38 +1000 Subject: [PATCH] Attempt to account for gcc differences. --- apps/opencs/model/world/data.hpp | 2 ++ apps/opencs/model/world/idadapterimp.hpp | 16 +++++++------- apps/opencs/model/world/subcellcollection.hpp | 22 +++++++++---------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/apps/opencs/model/world/data.hpp b/apps/opencs/model/world/data.hpp index 298a9be1f..b9e060002 100644 --- a/apps/opencs/model/world/data.hpp +++ b/apps/opencs/model/world/data.hpp @@ -42,7 +42,9 @@ #include "refcollection.hpp" #include "infocollection.hpp" #include "pathgrid.hpp" +#ifndef Q_MOC_RUN #include "subcellcollection.hpp" +#endif class QAbstractItemModel; diff --git a/apps/opencs/model/world/idadapterimp.hpp b/apps/opencs/model/world/idadapterimp.hpp index fa7c55bd3..025c2e137 100644 --- a/apps/opencs/model/world/idadapterimp.hpp +++ b/apps/opencs/model/world/idadapterimp.hpp @@ -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 (points.size())) throw std::runtime_error ("index out of range"); @@ -58,13 +58,13 @@ namespace CSMWorld virtual void setNestedTable(Record& record, const NestedTableWrapperBase& nestedTable) { record.get().mPoints = - static_cast &>(nestedTable).mNestedTable; + static_cast &>(nestedTable).mNestedTable; } virtual NestedTableWrapperBase* nestedTable(const Record& record) const { // deleted by dtor of NestedTableStoring - return new NestedTableWrapper(record.get().mPoints); + return new NestedTableWrapper(record.get().mPoints); } virtual QVariant getNestedData(const Record& 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 (edges.size())) throw std::runtime_error ("index out of range"); @@ -150,13 +150,13 @@ namespace CSMWorld virtual void setNestedTable(Record& record, const NestedTableWrapperBase& nestedTable) { record.get().mEdges = - static_cast &>(nestedTable).mNestedTable; + static_cast &>(nestedTable).mNestedTable; } virtual NestedTableWrapperBase* nestedTable(const Record& record) const { // deleted by dtor of NestedTableStoring - return new NestedTableWrapper(record.get().mEdges); + return new NestedTableWrapper(record.get().mEdges); } virtual QVariant getNestedData(const Record& record, int subRowIndex, int subColIndex) const diff --git a/apps/opencs/model/world/subcellcollection.hpp b/apps/opencs/model/world/subcellcollection.hpp index f2aeb5aaf..919a0a604 100644 --- a/apps/opencs/model/world/subcellcollection.hpp +++ b/apps/opencs/model/world/subcellcollection.hpp @@ -76,7 +76,7 @@ namespace CSMWorld template SubCellCollection::~SubCellCollection() { - for (std::map* >::iterator iter (mAdapters.begin()); + for (typename std::map* >::iterator iter (mAdapters.begin()); iter!=mAdapters.end(); ++iter) delete (*iter).second; } @@ -90,7 +90,7 @@ namespace CSMWorld template NestedIdAdapter* SubCellCollection::getAdapter(const ColumnBase &column) const { - std::map* >::const_iterator iter = + typename std::map* >::const_iterator iter = mAdapters.find (&column); if (iter==mAdapters.end()) @@ -102,59 +102,59 @@ namespace CSMWorld template void SubCellCollection::addNestedRow(int row, int column, int position) { - getAdapter(getColumn(column))->addNestedRow(getRecord(row), position); + getAdapter(Collection::getColumn(column))->addNestedRow(getRecord(row), position); } template void SubCellCollection::removeNestedRows(int row, int column, int subRow) { - getAdapter(getColumn(column))->removeNestedRow(getRecord(row), subRow); + getAdapter(Collection::getColumn(column))->removeNestedRow(getRecord(row), subRow); } template QVariant SubCellCollection::getNestedData (int row, int column, int subRow, int subColumn) const { - return getAdapter(getColumn(column))->getNestedData(getRecord(row), subRow, subColumn); + return getAdapter(Collection::getColumn(column))->getNestedData(getRecord(row), subRow, subColumn); } template void SubCellCollection::setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) { - getAdapter(getColumn(column))->setNestedData(getRecord(row), data, subRow, subColumn); + getAdapter(Collection::getColumn(column))->setNestedData(getRecord(row), data, subRow, subColumn); } template CSMWorld::NestedTableWrapperBase* SubCellCollection::nestedTable(int row, int column) const { - return getAdapter(getColumn(column))->nestedTable(getRecord(row)); + return getAdapter(Collection::getColumn(column))->nestedTable(getRecord(row)); } template void SubCellCollection::setNestedTable(int row, int column, const CSMWorld::NestedTableWrapperBase& nestedTable) { - getAdapter(getColumn(column))->setNestedTable(getRecord(row), nestedTable); + getAdapter(Collection::getColumn(column))->setNestedTable(getRecord(row), nestedTable); } template int SubCellCollection::getNestedRowsCount(int row, int column) const { - return getAdapter(getColumn(column))->getNestedRowsCount(getRecord(row)); + return getAdapter(Collection::getColumn(column))->getNestedRowsCount(getRecord(row)); } template int SubCellCollection::getNestedColumnsCount(int row, int column) const { - return getAdapter(getColumn(column))->getNestedColumnsCount(getRecord(row)); + return getAdapter(Collection::getColumn(column))->getNestedColumnsCount(getRecord(row)); } template CSMWorld::NestableColumn *SubCellCollection::getNestableColumn(int column) { - return Collection::getNestableColumn(column); + return Collection::getNestableColumn(column); } }