From d0a6bf9521279b11475490ddc24b87b948173425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zieli=C5=84ski?= Date: Mon, 5 Sep 2022 18:27:43 +0200 Subject: [PATCH] Cleaned up some warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomasz ZieliƄski --- mapeditor/inspector.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mapeditor/inspector.cpp b/mapeditor/inspector.cpp index 6344425c0..2ad82c49d 100644 --- a/mapeditor/inspector.cpp +++ b/mapeditor/inspector.cpp @@ -46,6 +46,7 @@ CGTownInstance * initialize(CGTownInstance * o) if(!spell->isSpecial() && !spell->isCreatureAbility()) o->possibleSpells.push_back(spell->id); } + return o; } Initializer::Initializer(CGObjectInstance * o) @@ -162,8 +163,8 @@ void PlayerColorDelegate::setEditorData(QWidget *editor, const QModelIndex &inde if (index.data().canConvert()) { PlayerColor player(qvariant_cast(index.data())); - QComboBox *editor = qobject_cast(editor); - editor->addItem(QString::number(player.getNum())); + QComboBox *ed = qobject_cast(editor); + ed->addItem(QString::number(player.getNum())); } else { @@ -175,8 +176,8 @@ void PlayerColorDelegate::setModelData(QWidget *editor, QAbstractItemModel *mode { if (index.data().canConvert()) { - QComboBox *editor = qobject_cast(editor); - model->setData(index, QVariant::fromValue(editor->currentText())); + QComboBox *ed = qobject_cast(editor); + model->setData(index, QVariant::fromValue(ed->currentText())); } else {