aboutsummaryrefslogtreecommitdiff
path: root/backends/vkeybd
diff options
context:
space:
mode:
Diffstat (limited to 'backends/vkeybd')
-rw-r--r--backends/vkeybd/image-map.cpp7
-rw-r--r--backends/vkeybd/image-map.h5
2 files changed, 5 insertions, 7 deletions
diff --git a/backends/vkeybd/image-map.cpp b/backends/vkeybd/image-map.cpp
index e3f986ee1b..359fc58d20 100644
--- a/backends/vkeybd/image-map.cpp
+++ b/backends/vkeybd/image-map.cpp
@@ -53,19 +53,18 @@ void ImageMap::removeArea(const String &id) {
}
void ImageMap::removeAllAreas() {
- HashMap<String, Polygon *>::iterator it;
- for (it = _areas.begin(); it != _areas.end(); ++it) {
+ for (AreaMap::iterator it = _areas.begin(); it != _areas.end(); ++it) {
delete it->_value;
}
_areas.clear();
}
String ImageMap::findMapArea(int16 x, int16 y) {
- HashMap<String, Polygon *>::iterator it;
- for (it = _areas.begin(); it != _areas.end(); ++it) {
+ for (AreaMap::iterator it = _areas.begin(); it != _areas.end(); ++it) {
if (it->_value->contains(x, y))
return it->_key;
}
+
return String();
}
diff --git a/backends/vkeybd/image-map.h b/backends/vkeybd/image-map.h
index 5132c31083..952ba624b0 100644
--- a/backends/vkeybd/image-map.h
+++ b/backends/vkeybd/image-map.h
@@ -35,9 +35,7 @@ namespace Common {
struct Polygon;
class ImageMap {
-
public:
-
~ImageMap();
Polygon *createArea(const String &id);
@@ -46,7 +44,8 @@ public:
String findMapArea(int16 x, int16 y);
protected:
- HashMap<String, Polygon *> _areas;
+ typedef HashMap<String, Polygon *> AreaMap;
+ AreaMap _areas;
};