X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fkeys.cpp;h=508c06fb9d24b4a38bdd216b1231924d9a0f4e7b;hb=5d688fbf457b1f4d3bebde431a7f58c898be584c;hp=37a376aaa6c662eb391aaa4704148f5adcb8e8dd;hpb=c9626e6953c16efc66575eff80c4c0de2f739041;p=libs%2Fgui.git diff --git a/source/input/keys.cpp b/source/input/keys.cpp index 37a376a..508c06f 100644 --- a/source/input/keys.cpp +++ b/source/input/keys.cpp @@ -1,11 +1,11 @@ #include +#include #ifdef WIN32 #include #else #include #include #endif -#include #include "keys.h" using namespace std; @@ -113,19 +113,19 @@ namespace Input { unsigned key_from_sys(unsigned code) { - static bool init_done=false; + static bool init_done = false; static map reverse_map; if(!init_done) { for(unsigned i=0; i::const_iterator i=reverse_map.find(code); + map::const_iterator i = reverse_map.find(code); if(i!=reverse_map.end()) return i->second; @@ -135,7 +135,7 @@ unsigned key_from_sys(unsigned code) unsigned key_to_sys(unsigned key) { if(key>=N_KEYS_) - throw InvalidParameterValue("Key out of range"); + throw invalid_argument("key_to_sys"); return keymap[key]; } @@ -144,7 +144,7 @@ unsigned mod_from_sys(unsigned mod) unsigned result = 0; for(unsigned i=0; i