mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-11 14:41:57 +00:00
CGameArea: Make use of size_t where applicable
Plays nicer with the standard library and avoids truncation warnings.
This commit is contained in:
@@ -33,11 +33,13 @@ void CLayerModel::SetArea(CGameArea *pArea)
|
||||
|
||||
CScriptLayer* CLayerModel::Layer(const QModelIndex& index) const
|
||||
{
|
||||
if (!mpArea) return nullptr;
|
||||
uint32 NumLayers = mpArea->NumScriptLayers();
|
||||
if (!mpArea)
|
||||
return nullptr;
|
||||
|
||||
if (index.row() < (int) NumLayers)
|
||||
return mpArea->ScriptLayer(index.row());
|
||||
const size_t NumLayers = mpArea->NumScriptLayers();
|
||||
|
||||
if (index.row() < static_cast<int>(NumLayers))
|
||||
return mpArea->ScriptLayer(static_cast<size_t>(index.row()));
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user