CGameArea: Make use of size_t where applicable

Plays nicer with the standard library and avoids truncation warnings.
This commit is contained in:
Lioncash
2020-06-18 05:10:09 -04:00
parent 456530605f
commit 6d98e918ae
13 changed files with 79 additions and 76 deletions

View File

@@ -76,7 +76,7 @@ void WCreateTab::OnLayersChanged()
ui->SpawnLayerComboBox->blockSignals(true);
ui->SpawnLayerComboBox->clear();
for (uint32 iLyr = 0; iLyr < pArea->NumScriptLayers(); iLyr++)
for (size_t iLyr = 0; iLyr < pArea->NumScriptLayers(); iLyr++)
ui->SpawnLayerComboBox->addItem(TO_QSTRING(pArea->ScriptLayer(iLyr)->Name()));
ui->SpawnLayerComboBox->setCurrentIndex(0);
@@ -88,5 +88,5 @@ void WCreateTab::OnLayersChanged()
void WCreateTab::OnSpawnLayerChanged(int LayerIndex)
{
CGameArea *pArea = mpEditor->ActiveArea();
mpSpawnLayer = pArea->ScriptLayer(LayerIndex);
mpSpawnLayer = pArea->ScriptLayer(static_cast<size_t>(LayerIndex));
}