template inline cCaheTxtHash::cCaheTxtHash( unsigned int hashSize ) : cCacheTempHash, TVAL>(hashSize) { } template inline cCacheTempHash::cCacheTempHash( unsigned int hashSize ) : TPARENT( hashSize ) { } template inline cCacheTempHash::~cCacheTempHash() { } template inline unsigned int cCacheTempHash::KeyToHashIndex(sCacheKey* pcKey) const { unsigned int uiHash = 0; LPCTSTR str = pcKey->szString; for(unsigned int i=0;istrSize;i++) { uiHash = (uiHash << 5) + uiHash + *str++; } return uiHash % TPARENT::m_uiHashSize; } template inline bool cCacheTempHash::IsKeysEqual(sCacheKey* pcKey1, sCacheKey* pcKey2) const { if( pcKey1->strSize != pcKey2->strSize ) return false; if( pcKey1->hFont != pcKey2->hFont ) return false; if ( pcKey1->color != pcKey2->color ) return false; // if( ::memcmp( pcKey1->szString, pcKey2->szString, pcKey2->strSize*sizeof(TCHAR) ) ) if( ::_tcscmp(pcKey1->szString, pcKey2->szString) ) return false; return true; }