CEGUICommonFileDialog.h // template T getEntryFromHashMap (Z id, hash_map* hashMap) { // Search the entry in the hashMap if (hashMap) { typename hash_map::iterator hashMapIterator; hashMapIterator = hashMap->find (id); if (hashMapIterator != hashMap->end()) { // Found it return hashMapIterator->second; } } return NULL; } // CEGUICommonFileDialog.cpp // CCommonFileDialog::_Path* CCommonFileDialog::_getPathOfSelectedDrive (void) { String szDrive = _getCurrentDrive(); _Path* path = getEntryFromHashMap (string(szDrive.c_str()), &_currentPaths); if (!path) { // No path found, add a new one path = new _Path (""); String szCurrentPath = _getWorkingPath(); if (szDrive == _stripDrive(szCurrentPath)) path->szAbsolutePath = szCurrentPath; else path->szAbsolutePath = szDrive; addEntryToHashMap (string(szDrive.c_str()), path, &_currentPaths); } return path; } //