diff options
author | Johannes Schickel | 2012-01-03 01:56:43 +0100 |
---|---|---|
committer | Johannes Schickel | 2012-01-03 02:13:33 +0100 |
commit | 1c2a21c42b9485000fd3a27c06f88d3eb1b38abc (patch) | |
tree | 3abdf72e6c9766b10021549ab2607e76efc9bb51 /backends/vkeybd | |
parent | 24d99038e44cb8ab7bf15dc3517a3deeecac0568 (diff) | |
download | scummvm-rg350-1c2a21c42b9485000fd3a27c06f88d3eb1b38abc.tar.gz scummvm-rg350-1c2a21c42b9485000fd3a27c06f88d3eb1b38abc.tar.bz2 scummvm-rg350-1c2a21c42b9485000fd3a27c06f88d3eb1b38abc.zip |
VKEYBD: Slight cleanup.
Diffstat (limited to 'backends/vkeybd')
-rw-r--r-- | backends/vkeybd/virtual-keyboard.cpp | 10 | ||||
-rw-r--r-- | backends/vkeybd/virtual-keyboard.h | 6 |
2 files changed, 7 insertions, 9 deletions
diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp index 7d47b709a7..678c751410 100644 --- a/backends/vkeybd/virtual-keyboard.cpp +++ b/backends/vkeybd/virtual-keyboard.cpp @@ -56,11 +56,9 @@ VirtualKeyboard::~VirtualKeyboard() { } void VirtualKeyboard::deleteEvents() { - ModeMap::iterator it_m; - VKEventMap::iterator it_e; - for (it_m = _modes.begin(); it_m != _modes.end(); ++it_m) { - VKEventMap *evt = &(it_m->_value.events); - for (it_e = evt->begin(); it_e != evt->end(); ++it_e) + for (ModeMap::iterator it_m = _modes.begin(); it_m != _modes.end(); ++it_m) { + VKEventMap &evt = it_m->_value.events; + for (VKEventMap::iterator it_e = evt.begin(); it_e != evt.end(); ++it_e) delete it_e->_value; } } @@ -332,7 +330,7 @@ void VirtualKeyboard::KeyPressQueue::insertKey(KeyState key) { void VirtualKeyboard::KeyPressQueue::deleteKey() { if (_keyPos == _keys.begin()) return; - List<VirtualKeyPress>::iterator it = _keyPos; + KeyPressList::iterator it = _keyPos; it--; _strPos -= it->strLen; while ((it->strLen)-- > 0) diff --git a/backends/vkeybd/virtual-keyboard.h b/backends/vkeybd/virtual-keyboard.h index 21f149ae57..4ab5ad446d 100644 --- a/backends/vkeybd/virtual-keyboard.h +++ b/backends/vkeybd/virtual-keyboard.h @@ -172,13 +172,13 @@ protected: byte _flags; String _flagsStr; - - List<VirtualKeyPress> _keys; + typedef List<VirtualKeyPress> KeyPressList; + KeyPressList _keys; String _keysStr; bool _strChanged; - List<VirtualKeyPress>::iterator _keyPos; + KeyPressList::iterator _keyPos; uint _strPos; }; |