mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
rwgame+rwviewer: fix -Wunused-variable warnings
This commit is contained in:
parent
1af5d74faa
commit
f06d9f5eb2
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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()));
|
||||
|
@ -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<ModelFrame*>(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) {
|
||||
|
@ -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) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <data/Clump.hpp>
|
||||
#include <glm/gtx/string_cast.hpp>
|
||||
|
||||
void ModelFramesWidget::updateInfoBox(ClumpPtr model, ModelFrame* f) {
|
||||
void ModelFramesWidget::updateInfoBox(ClumpPtr, ModelFrame* f) {
|
||||
if (f == nullptr) {
|
||||
_frameLabel->setText("");
|
||||
} else {
|
||||
|
@ -13,7 +13,7 @@ public:
|
||||
: PickupObject(engine, position, 0, OnStreet) {
|
||||
}
|
||||
|
||||
bool onCharacterTouch(CharacterObject* character) {
|
||||
bool onCharacterTouch(CharacterObject*) {
|
||||
picked_up = true;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user