fixed hashmap use

svn-id: r23007
This commit is contained in:
Kostas Nakos 2006-06-10 11:23:40 +00:00
parent 3b4416bb37
commit a6a98c0009
3 changed files with 5 additions and 15 deletions

View File

@ -33,10 +33,9 @@ namespace CEGUI {
bool Panel::add(const String &name, const PanelItem *item) {
PanelItem *ni;
ni = _itemsMap[name] = (PanelItem*)item;
ni->move(_currentItem, _y + 10);
ni->setPanel(this);
_itemsMap[name] = (PanelItem*)item;
_itemsMap[name]->move(_currentItem, _y + 10);
_itemsMap[name]->setPanel(this);
_currentItem += _interleave;
return true;

View File

@ -48,12 +48,8 @@ namespace CEGUI {
virtual void forceRedraw();
virtual bool action(int x, int y, bool pushed);
private:
struct IgnoreCaseComparator {
int operator()(const String& x, const String& y) const {
return scumm_stricmp(x.c_str(), y.c_str()); }
};
typedef HashMap<String, PanelItem*, Common::IgnoreCase_Hash , IgnoreCaseComparator> ItemMap;
typedef HashMap<String, PanelItem*, Common::IgnoreCase_Hash , Common::IgnoreCase_EqualTo> ItemMap;
ItemMap _itemsMap;
int _interleave;

View File

@ -55,12 +55,7 @@ namespace CEGUI {
virtual ~ToolbarHandler();
private:
struct IgnoreCaseComparator {
int operator()(const String& x, const String& y) const {
return scumm_stricmp(x.c_str(), y.c_str()); }
};
HashMap<String, Toolbar*, Common::IgnoreCase_Hash, IgnoreCaseComparator> _toolbarMap;
HashMap<String, Toolbar*, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _toolbarMap;
String _current;
Toolbar *_active;
int _offset;