diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-26 20:58:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-26 21:45:25 +0300 |
commit | a6978e254af2a83b2b52778b4c59828b07542e5b (patch) | |
tree | 6cdca313b863f3f60825afd7cb62e342906e7495 | |
parent | f5ac38e101f180d6f7e5d6b4cd42bcad99af58a6 (diff) | |
download | mv-a6978e254af2a83b2b52778b4c59828b07542e5b.tar.gz mv-a6978e254af2a83b2b52778b4c59828b07542e5b.tar.bz2 mv-a6978e254af2a83b2b52778b4c59828b07542e5b.tar.xz mv-a6978e254af2a83b2b52778b4c59828b07542e5b.zip |
Fix code style and auto check issues.
-rw-r--r-- | src/actionmanager.h | 2 | ||||
-rw-r--r-- | src/depricatedevent.cpp | 12 | ||||
-rw-r--r-- | src/game.cpp | 3 | ||||
-rw-r--r-- | src/inputevent.h | 2 | ||||
-rw-r--r-- | src/keyboardconfig.h | 5 | ||||
-rw-r--r-- | src/keyboarddata.h | 13 |
6 files changed, 26 insertions, 11 deletions
diff --git a/src/actionmanager.h b/src/actionmanager.h index f0dcb9d77..05d84b989 100644 --- a/src/actionmanager.h +++ b/src/actionmanager.h @@ -109,6 +109,4 @@ namespace ActionManager decHandler(didYouKnowWindowShow); } -typedef bool (*ActionFuncPtr) (InputEvent &event); - #endif diff --git a/src/depricatedevent.cpp b/src/depricatedevent.cpp index 965876fd1..0d5ffca7b 100644 --- a/src/depricatedevent.cpp +++ b/src/depricatedevent.cpp @@ -39,7 +39,8 @@ DepricatedEvent::~DepricatedEvent() } } -void DepricatedEvent::setInt(const std::string &key, int value) throw (BadDepricatedEvent) +void DepricatedEvent::setInt(const std::string &key, int value) + throw (BadDepricatedEvent) { if (mData.find(key) != mData.end()) throw KEY_ALREADY_EXISTS; @@ -47,7 +48,8 @@ void DepricatedEvent::setInt(const std::string &key, int value) throw (BadDepric mData[key] = new IntData(value); } -int DepricatedEvent::getInt(const std::string &key) const throw (BadDepricatedEvent) +int DepricatedEvent::getInt(const std::string &key) const + throw (BadDepricatedEvent) { VariableMap::const_iterator it = mData.find(key); if (it == mData.end()) @@ -82,7 +84,8 @@ const std::string &DepricatedEvent::getString(const std::string &key) } -void DepricatedEvent::setFloat(const std::string &key, double value) throw (BadDepricatedEvent) +void DepricatedEvent::setFloat(const std::string &key, double value) + throw (BadDepricatedEvent) { if (mData.find(key) != mData.end()) throw KEY_ALREADY_EXISTS; @@ -90,7 +93,8 @@ void DepricatedEvent::setFloat(const std::string &key, double value) throw (BadD mData[key] = new FloatData(value); } -double DepricatedEvent::getFloat(const std::string &key) const throw (BadDepricatedEvent) +double DepricatedEvent::getFloat(const std::string &key) const + throw (BadDepricatedEvent) { VariableMap::const_iterator it = mData.find(key); if (it == mData.end()) diff --git a/src/game.cpp b/src/game.cpp index 487f55f35..b17646730 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -950,7 +950,6 @@ void Game::handleInput() if (joystick) joystick->update(); - bool wasDown(false); // Events SDL_Event event; while (SDL_PollEvent(&event)) @@ -968,8 +967,6 @@ void Game::handleInput() // Keyboard events (for discontinuous keys) else if (event.type == SDL_KEYDOWN) { - wasDown = true; - if (setupWindow && setupWindow->isVisible() && keyboard.getNewKeyIndex() > keyboard.KEY_NO_VALUE) { diff --git a/src/inputevent.h b/src/inputevent.h index 7b73bba11..056a14e90 100644 --- a/src/inputevent.h +++ b/src/inputevent.h @@ -30,4 +30,6 @@ struct InputEvent int mask; }; +typedef bool (*ActionFuncPtr) (InputEvent &event); + #endif diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h index a7542f17c..7efe5a16a 100644 --- a/src/keyboardconfig.h +++ b/src/keyboardconfig.h @@ -26,11 +26,12 @@ #include <SDL_types.h> #include <SDL_keyboard.h> +#include "inputevent.h" + +#include <map> #include <string> #include <vector> -#include "actionmanager.h" - union SDL_Event; typedef std::vector<int> KeysVector; diff --git a/src/keyboarddata.h b/src/keyboarddata.h index 78a6e990a..bfb0dbed1 100644 --- a/src/keyboarddata.h +++ b/src/keyboarddata.h @@ -20,7 +20,18 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef KEYBOARDDATA_H +#define KEYBOARDDATA_H + +#include "actionmanager.h" +#include "inputmanager.h" +#include "keyboardconfig.h" +#include "localconsts.h" + #include "utils/gettext.h" +#include "utils/stringutils.h" + +#include <string> struct KeyData { @@ -1003,3 +1014,5 @@ static KeyData const keyData[KeyboardConfig::KEY_TOTAL] = { KeyboardConfig::KEY_NO_VALUE, 50, COND_DEFAULT} }; + +#endif |