aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/vkeybd/virtual-keyboard.cpp10
-rw-r--r--backends/vkeybd/virtual-keyboard.h6
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;
};