All pastes #276428 Raw Edit

Files for prev. err.

public cpp v1 · immutable
·published 2006-12-12 09:34 UTC
rendered paste body
CEGUICommonFileDialog.h//<snip>    template<typename Z, class T>    T getEntryFromHashMap (Z id, hash_map<Z, T>* hashMap)    {        // Search the entry in the hashMap        if (hashMap)        {            typename hash_map<Z, T>::iterator hashMapIterator;            hashMapIterator = hashMap->find (id);            if (hashMapIterator != hashMap->end())            {                // Found it                return hashMapIterator->second;            }        }        return NULL;    }//<snip>CEGUICommonFileDialog.cpp//<snip>    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;    }//<snip>