mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-18 16:32:32 +02:00
Fix some unused variable compiler warnings in rwgame
This commit is contained in:
parent
a08f20dd5b
commit
cb49e59c86
@ -48,17 +48,26 @@ public:
|
||||
|
||||
virtual void activate(float clickX, float clickY) = 0;
|
||||
};
|
||||
|
||||
|
||||
struct Entry : public MenuEntry
|
||||
{
|
||||
std::function<void (void)> callback;
|
||||
|
||||
Entry(const std::string& title, std::function<void (void)> cb, float size)
|
||||
: MenuEntry(title, size), callback(cb) {}
|
||||
|
||||
void activate(float clickX, float clickY) { callback(); }
|
||||
std::function<void(void)> callback;
|
||||
|
||||
Entry(const std::string& title,
|
||||
std::function<void(void)> cb,
|
||||
float size)
|
||||
: MenuEntry(title, size), callback(cb)
|
||||
{
|
||||
}
|
||||
|
||||
void activate(float clickX, float clickY)
|
||||
{
|
||||
RW_UNUSED(clickX);
|
||||
RW_UNUSED(clickY);
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static std::shared_ptr<MenuEntry> lambda(const std::string& n, std::function<void (void)> callback, float size = 30.f)
|
||||
{
|
||||
return std::shared_ptr<MenuEntry>(new Entry(n, callback, size));
|
||||
|
@ -213,11 +213,6 @@ Menu* DebugState::createMapMenu()
|
||||
|
||||
Menu* DebugState::createVehicleMenu()
|
||||
{
|
||||
CharacterObject* player = nullptr;
|
||||
if (game->getPlayer()) {
|
||||
player = game->getPlayer()->getCharacter();
|
||||
}
|
||||
|
||||
Menu* m = new Menu(2);
|
||||
m->offset = kDebugMenuOffset;
|
||||
|
||||
@ -252,11 +247,6 @@ Menu* DebugState::createVehicleMenu()
|
||||
|
||||
Menu* DebugState::createAIMenu()
|
||||
{
|
||||
CharacterObject* player = nullptr;
|
||||
if (game->getPlayer()) {
|
||||
player = game->getPlayer()->getCharacter();
|
||||
}
|
||||
|
||||
Menu* m = new Menu(2);
|
||||
m->offset = kDebugMenuOffset;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user