Update of /cvsroot/decaldev/source/Decal
In directory usw-pr-cvs1:/tmp/cvs-serv14978
Modified Files:
StdAfx.h ACHooks.h ACHooks.cpp
Log Message:
list->Map change for QueryMemLoc (minor perf increase)
Index: StdAfx.h
===================================================================
RCS file: /cvsroot/decaldev/source/Decal/StdAfx.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** StdAfx.h 30 Sep 2001 03:07:37 -0000 1.3
--- StdAfx.h 30 Aug 2002 08:44:57 -0000 1.4
***************
*** 31,34 ****
--- 31,35 ----
#include <string>
#include <list>
+ #include <map>
#include <vector>
#include <deque>
Index: ACHooks.h
===================================================================
RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** ACHooks.h 28 Aug 2002 20:55:03 -0000 1.15
--- ACHooks.h 30 Aug 2002 08:44:57 -0000 1.16
***************
*** 44,49 ****
long m_Hooks ;
! typedef std::list< sMemoryLocation > LocList;
! LocList m_lLocationList;
bool m_bPrevSelect;
--- 44,49 ----
long m_Hooks ;
! typedef std::map< std::string, sMemoryLocation > LocMap;
! LocMap m_mLocationList;
bool m_bPrevSelect;
Index: ACHooks.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** ACHooks.cpp 28 Aug 2002 20:55:03 -0000 1.14
--- ACHooks.cpp 30 Aug 2002 08:44:57 -0000 1.15
***************
*** 56,60 ****
VARIANT_BOOL bSuccess = pMemLocDoc->load( szPath );
-
if( bSuccess )
{
--- 56,59 ----
***************
*** 71,75 ****
loc.Location = wcstoul( vValue.bstrVal, 0, 16 );
! m_lLocationList.push_back( loc );
}
}
--- 70,74 ----
loc.Location = wcstoul( vValue.bstrVal, 0, 16 );
! m_mLocationList[ loc.Name ] = loc;
}
}
***************
*** 307,317 ****
std::string queryName = OLE2A( bstrName );
! for( LocList::iterator i = m_lLocationList.begin(); i != m_lLocationList.end(); i++ )
{
! if( stricmp( queryName.c_str(), i->Name.c_str() ) == 0 )
! {
! *pVal = i->Location;
return S_OK;
- }
}
--- 306,314 ----
std::string queryName = OLE2A( bstrName );
! LocMap::iterator i = m_mLocationList.find( queryName );
! if( i != m_mLocationList.end() )
{
! *pVal = i->second.Location;
return S_OK;
}
|