diff --git a/rwgame/RWGame.cpp b/rwgame/RWGame.cpp index 73cb05fb..47139f68 100644 --- a/rwgame/RWGame.cpp +++ b/rwgame/RWGame.cpp @@ -244,9 +244,9 @@ void RWGame::handleCheatInput(char symbol) { // The iPod / Android version of the game (10th year anniversary) spawns random // (?) vehicles instead of always rhino #ifdef RW_GAME_GTA3_ANNIVERSARY - uint16_t vehicleModel = 110; // @todo Which cars are spawned?! + // uint16_t vehicleModel = 110; // @todo Which cars are spawned?! #else - uint16_t vehicleModel = 122; + // uint16_t vehicleModel = 122; #endif // @todo Spawn rhino // @todo ShowHelpMessage("CHEAT1"); // III / VC: Inputting most diff --git a/rwviewer/AnimationListModel.cpp b/rwviewer/AnimationListModel.cpp index e70ca6c7..aedc165b 100644 --- a/rwviewer/AnimationListModel.cpp +++ b/rwviewer/AnimationListModel.cpp @@ -23,10 +23,10 @@ QVariant AnimationListModel::headerData(int section, return QVariant::Invalid; } -int AnimationListModel::rowCount(const QModelIndex& parent) const { +int AnimationListModel::rowCount(const QModelIndex&) const { return animations.size(); } -int AnimationListModel::columnCount(const QModelIndex& parent) const { +int AnimationListModel::columnCount(const QModelIndex&) const { return 1; } diff --git a/rwviewer/IMGArchiveModel.cpp b/rwviewer/IMGArchiveModel.cpp index 023d995c..346a8215 100644 --- a/rwviewer/IMGArchiveModel.cpp +++ b/rwviewer/IMGArchiveModel.cpp @@ -29,10 +29,10 @@ QVariant IMGArchiveModel::headerData(int section, Qt::Orientation orientation, return QVariant::Invalid; } -int IMGArchiveModel::rowCount(const QModelIndex& parent) const { +int IMGArchiveModel::rowCount(const QModelIndex&) const { return archive.getAssetCount(); } -int IMGArchiveModel::columnCount(const QModelIndex& parent) const { +int IMGArchiveModel::columnCount(const QModelIndex&) const { return 2; } diff --git a/rwviewer/ItemListModel.cpp b/rwviewer/ItemListModel.cpp index 0aab0530..1914bf4f 100644 --- a/rwviewer/ItemListModel.cpp +++ b/rwviewer/ItemListModel.cpp @@ -13,11 +13,11 @@ ItemListModel::ItemListModel(GameWorld *world, QObject *parent) : QAbstractTableModel(parent), _world(world) { } -int ItemListModel::rowCount(const QModelIndex &parent) const { +int ItemListModel::rowCount(const QModelIndex &) const { return _world->data->modelinfo.size(); } -int ItemListModel::columnCount(const QModelIndex &parent) const { +int ItemListModel::columnCount(const QModelIndex &) const { return 2; } diff --git a/rwviewer/ViewerWindow.cpp b/rwviewer/ViewerWindow.cpp index f6c46000..9b198c9b 100644 --- a/rwviewer/ViewerWindow.cpp +++ b/rwviewer/ViewerWindow.cpp @@ -109,8 +109,7 @@ ViewerWindow::ViewerWindow(QWidget* parent, Qt::WindowFlags flags) auto mainwidget = new QWidget(); mainwidget->setLayout(mainlayout); - QMenu* data = mb->addMenu("&Data"); - // data->addAction("Export &Model", objectViewer, SLOT(exportModel())); + mb->addMenu("&Data"); QMenu* anim = mb->addMenu("&Animation"); anim->addAction("Load &Animations", this, SLOT(openAnimations())); diff --git a/rwviewer/models/DFFFramesTreeModel.cpp b/rwviewer/models/DFFFramesTreeModel.cpp index 9af8b116..1dd75625 100644 --- a/rwviewer/models/DFFFramesTreeModel.cpp +++ b/rwviewer/models/DFFFramesTreeModel.cpp @@ -6,7 +6,7 @@ DFFFramesTreeModel::DFFFramesTreeModel(ClumpPtr m, : QAbstractItemModel(parent), model(m) { } -int DFFFramesTreeModel::columnCount(const QModelIndex& parent) const { +int DFFFramesTreeModel::columnCount(const QModelIndex&) const { return 1; } @@ -70,8 +70,6 @@ bool DFFFramesTreeModel::setData(const QModelIndex& index, return false; } - ModelFrame* f = static_cast(index.internalPointer()); - if (role == Qt::CheckStateRole) { if (index.column() == 0) { if ((Qt::CheckState)value.toInt() == Qt::Checked) { @@ -99,7 +97,7 @@ Qt::ItemFlags DFFFramesTreeModel::flags(const QModelIndex& index) const { return flags; } -QVariant DFFFramesTreeModel::headerData(int section, +QVariant DFFFramesTreeModel::headerData(int, Qt::Orientation orientation, int role) const { if (orientation == Qt::Horizontal) { diff --git a/rwviewer/models/ObjectListModel.cpp b/rwviewer/models/ObjectListModel.cpp index 6c14d36b..539b3d3c 100644 --- a/rwviewer/models/ObjectListModel.cpp +++ b/rwviewer/models/ObjectListModel.cpp @@ -4,18 +4,18 @@ ObjectListModel::ObjectListModel(GameData *dat, QObject *parent) : QAbstractTableModel(parent), _gameData(dat) { } -int ObjectListModel::rowCount(const QModelIndex &parent) const { +int ObjectListModel::rowCount(const QModelIndex &) const { return _gameData->modelinfo.size(); } -int ObjectListModel::columnCount(const QModelIndex &parent) const { +int ObjectListModel::columnCount(const QModelIndex &) const { return 3; } QVariant ObjectListModel::data(const QModelIndex &index, int role) const { if (role == Qt::DisplayRole) { + if (!index.isValid()) return QVariant::Invalid; auto id = index.internalId(); - if (id == -1) return QVariant::Invalid; if (index.column() == 0) { return id; } else if (index.column() == 1) { diff --git a/rwviewer/widgets/ModelFramesWidget.cpp b/rwviewer/widgets/ModelFramesWidget.cpp index e2312db0..aa02aca8 100644 --- a/rwviewer/widgets/ModelFramesWidget.cpp +++ b/rwviewer/widgets/ModelFramesWidget.cpp @@ -2,7 +2,7 @@ #include #include -void ModelFramesWidget::updateInfoBox(ClumpPtr model, ModelFrame* f) { +void ModelFramesWidget::updateInfoBox(ClumpPtr, ModelFrame* f) { if (f == nullptr) { _frameLabel->setText(""); } else { diff --git a/tests/test_Pickup.cpp b/tests/test_Pickup.cpp index a2b820d5..06d5d060 100644 --- a/tests/test_Pickup.cpp +++ b/tests/test_Pickup.cpp @@ -13,7 +13,7 @@ public: : PickupObject(engine, position, 0, OnStreet) { } - bool onCharacterTouch(CharacterObject* character) { + bool onCharacterTouch(CharacterObject*) { picked_up = true; return true; }