From 22b4f36bbce3e8868fad0e5258f8895199a49e07 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Thu, 15 Aug 2019 07:59:54 -0230 Subject: [PATCH] Remove redundant variable. --- src/common/PJoystickHandler.cxx | 5 ++--- src/common/PJoystickHandler.hxx | 3 +-- src/emucore/EventHandler.cxx | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/common/PJoystickHandler.cxx b/src/common/PJoystickHandler.cxx index d0a707737..f7c02fe2f 100644 --- a/src/common/PJoystickHandler.cxx +++ b/src/common/PJoystickHandler.cxx @@ -31,10 +31,9 @@ static constexpr char CTRL_DELIM = '^'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PhysicalJoystickHandler::PhysicalJoystickHandler( - OSystem& system, EventHandler& handler, Event& event) + OSystem& system, EventHandler& handler) : myOSystem(system), - myHandler(handler), - myEvent(event) + myHandler(handler) { Int32 version = myOSystem.settings().getInt("event_ver"); // Load previously saved joystick mapping (if any) from settings diff --git a/src/common/PJoystickHandler.hxx b/src/common/PJoystickHandler.hxx index ab782a0d2..c40a85b06 100644 --- a/src/common/PJoystickHandler.hxx +++ b/src/common/PJoystickHandler.hxx @@ -61,7 +61,7 @@ class PhysicalJoystickHandler }; public: - PhysicalJoystickHandler(OSystem& system, EventHandler& handler, Event& event); + PhysicalJoystickHandler(OSystem& system, EventHandler& handler); /** Return stick ID on success, -1 on failure. */ int add(PhysicalJoystickPtr stick); @@ -112,7 +112,6 @@ class PhysicalJoystickHandler OSystem& myOSystem; EventHandler& myHandler; - Event& myEvent; // Contains all joysticks that Stella knows about, indexed by name StickDatabase myDatabase; diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 6608c6806..d4db078de 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -73,7 +73,7 @@ EventHandler::EventHandler(OSystem& osystem) myPKeyHandler = make_unique(osystem, *this); // Create joystick handler (to handle all physical joystick functionality) - myPJoyHandler = make_unique(osystem, *this, myEvent); + myPJoyHandler = make_unique(osystem, *this); // Erase the 'combo' array for(int i = 0; i < COMBO_SIZE; ++i)