mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 08:57:09 +00:00
Cleanup; fixed tons of warnings, set up the project to treat warnings as errors
This commit is contained in:
@@ -11,7 +11,7 @@ CLayerModel::~CLayerModel()
|
||||
{
|
||||
}
|
||||
|
||||
int CLayerModel::rowCount(const QModelIndex &parent) const
|
||||
int CLayerModel::rowCount(const QModelIndex& /*parent*/) const
|
||||
{
|
||||
if (!mpArea) return 0;
|
||||
if (mHasGenerateLayer) return mpArea->GetScriptLayerCount() + 1;
|
||||
@@ -38,7 +38,7 @@ CScriptLayer* CLayerModel::Layer(const QModelIndex& index) const
|
||||
if (!mpArea) return nullptr;
|
||||
u32 NumLayers = mpArea->GetScriptLayerCount();
|
||||
|
||||
if (index.row() < NumLayers)
|
||||
if (index.row() < (int) NumLayers)
|
||||
return mpArea->GetScriptLayer(index.row());
|
||||
if (mHasGenerateLayer && (index.row() == NumLayers))
|
||||
return mpArea->GetGeneratorLayer();
|
||||
|
||||
@@ -43,27 +43,27 @@ QVariant CLayersInstanceModel::headerData(int section, Qt::Orientation orientati
|
||||
return QVariant::Invalid;
|
||||
}
|
||||
|
||||
QModelIndex CLayersInstanceModel::index(int row, int column, const QModelIndex &parent) const
|
||||
QModelIndex CLayersInstanceModel::index(int /*row*/, int /*column*/, const QModelIndex& /*parent*/) const
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
QModelIndex CLayersInstanceModel::parent(const QModelIndex &child) const
|
||||
QModelIndex CLayersInstanceModel::parent(const QModelIndex& /*child*/) const
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
int CLayersInstanceModel::rowCount(const QModelIndex &parent) const
|
||||
int CLayersInstanceModel::rowCount(const QModelIndex& /*parent*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CLayersInstanceModel::columnCount(const QModelIndex &parent) const
|
||||
int CLayersInstanceModel::columnCount(const QModelIndex& /*parent*/) const
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
QVariant CLayersInstanceModel::data(const QModelIndex &index, int role) const
|
||||
QVariant CLayersInstanceModel::data(const QModelIndex& /*index*/, int /*role*/) const
|
||||
{
|
||||
return QVariant::Invalid;
|
||||
}
|
||||
@@ -75,22 +75,22 @@ void CLayersInstanceModel::SetEditor(CWorldEditor *pEditor)
|
||||
mpArea = (pEditor ? pEditor->ActiveArea() : nullptr);
|
||||
}
|
||||
|
||||
void CLayersInstanceModel::NodeCreated(CSceneNode *pNode)
|
||||
void CLayersInstanceModel::NodeCreated(CSceneNode* /*pNode*/)
|
||||
{
|
||||
emit layoutChanged();
|
||||
}
|
||||
|
||||
void CLayersInstanceModel::NodeDeleted(CSceneNode *pNode)
|
||||
void CLayersInstanceModel::NodeDeleted(CSceneNode* /*pNode*/)
|
||||
{
|
||||
emit layoutChanged();
|
||||
}
|
||||
|
||||
CScriptLayer* CLayersInstanceModel::IndexLayer(const QModelIndex& index) const
|
||||
CScriptLayer* CLayersInstanceModel::IndexLayer(const QModelIndex& /*index*/) const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CScriptObject* CLayersInstanceModel::IndexObject(const QModelIndex& index) const
|
||||
CScriptObject* CLayersInstanceModel::IndexObject(const QModelIndex& /*index*/) const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ int CLinkModel::rowCount(const QModelIndex&) const
|
||||
else return 0;
|
||||
}
|
||||
|
||||
int CLinkModel::columnCount(const QModelIndex &parent) const
|
||||
int CLinkModel::columnCount(const QModelIndex& /*parent*/) const
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ QModelIndex CTypesInstanceModel::index(int row, int column, const QModelIndex &p
|
||||
if (mModelType == eLayers)
|
||||
{
|
||||
CScriptLayer *pLayer = mpArea->GetScriptLayer(parent.row());
|
||||
if (row >= pLayer->GetNumObjects())
|
||||
if ((u32) row >= pLayer->GetNumObjects())
|
||||
return QModelIndex();
|
||||
else
|
||||
return createIndex(row, column, (*pLayer)[row]);
|
||||
@@ -95,7 +95,7 @@ QModelIndex CTypesInstanceModel::index(int row, int column, const QModelIndex &p
|
||||
else if (mModelType == eTypes)
|
||||
{
|
||||
const std::list<CScriptObject*>& list = mTemplateList[parent.row()]->ObjectList();
|
||||
if (row >= list.size())
|
||||
if ((u32) row >= list.size())
|
||||
return QModelIndex();
|
||||
else
|
||||
{
|
||||
@@ -146,7 +146,7 @@ QModelIndex CTypesInstanceModel::parent(const QModelIndex &child) const
|
||||
{
|
||||
CScriptTemplate *pTemp = pObj->Template();
|
||||
|
||||
for (u32 iTemp = 0; iTemp < mTemplateList.size(); iTemp++)
|
||||
for (int iTemp = 0; iTemp < mTemplateList.size(); iTemp++)
|
||||
{
|
||||
if (mTemplateList[iTemp] == pTemp)
|
||||
return createIndex(iTemp, 0, (iTemp << TYPES_ROW_INDEX_SHIFT) | 1);
|
||||
@@ -193,7 +193,7 @@ int CTypesInstanceModel::rowCount(const QModelIndex &parent) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CTypesInstanceModel::columnCount(const QModelIndex &parent) const
|
||||
int CTypesInstanceModel::columnCount(const QModelIndex& /*parent*/) const
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user