MCPcopy Create free account
hub / github.com/cinience/RedisStudio / Set

Method Set

DuiLib/Utils/Utils.cpp:914–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912 }
913
914 LPVOID CStdStringPtrMap::Set(LPCTSTR key, LPVOID pData)
915 {
916 if( m_nBuckets == 0 ) return pData;
917
918 if (GetSize()>0) {
919 UINT slot = HashKey(key) % m_nBuckets;
920 // Modify existing item
921 for( TITEM* pItem = m_aT[slot]; pItem; pItem = pItem->pNext ) {
922 if( pItem->Key == key ) {
923 LPVOID pOldData = pItem->Data;
924 pItem->Data = pData;
925 return pOldData;
926 }
927 }
928 }
929
930 Insert(key, pData);
931 return NULL;
932 }
933
934 bool CStdStringPtrMap::Remove(LPCTSTR key)
935 {

Callers 3

UIManager.cppFile · 0.45
CreateControlMethod · 0.45

Calls 2

HashKeyFunction · 0.85
GetSizeFunction · 0.50

Tested by

no test coverage detected