Changeset 564 in dev for trunk/ab5.0/jenga/include/common
- Timestamp:
- May 5, 2008, 2:17:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/jenga/include/common/Hashmap.h
r520 r564 86 86 } 87 87 88 bool IsExist ( const std::string &keyName ) const88 bool IsExistDuplicationKeyName( const std::string &keyName ) const 89 89 { 90 90 int key = GetHash( keyName.c_str() ); 91 91 92 92 if(hashArray[key]){ 93 T *temp = hashArray[key];93 const T *temp = hashArray[key]; 94 94 while( true ){ 95 95 if( temp->IsDuplication( keyName ) ) 96 { 97 // 重複している 98 return true; 99 } 100 101 if( temp->GetChainNext() == NULL ) 102 { 103 break; 104 } 105 temp = temp->GetChainNext(); 106 } 107 } 108 109 return false; 110 } 111 112 bool IsExist( const T* value ) const 113 { 114 int key = GetHash( value->GetKeyName().c_str() ); 115 116 if(hashArray[key]){ 117 const T *temp = hashArray[key]; 118 while( true ){ 119 if( temp->IsDuplication( value ) ) 96 120 { 97 121 // 重複している
Note:
See TracChangeset
for help on using the changeset viewer.