Fix build problems when using HashMap.
This commit is contained in:
		
							parent
							
								
									e489b4a570
								
							
						
					
					
						commit
						57e1c7d55f
					
				| @ -57,6 +57,10 @@ class HashMap : public AllocPolicy | ||||
|     K key; | ||||
|     V value; | ||||
| 
 | ||||
|     Entry() | ||||
|     { | ||||
|     } | ||||
| 
 | ||||
|     Entry(const K &aKey, const V &aValue) | ||||
|      : key(aKey), | ||||
|        value(aValue) | ||||
| @ -120,6 +124,13 @@ class HashMap : public AllocPolicy | ||||
|     return table_.add(i, Entry(key, value)); | ||||
|   } | ||||
| 
 | ||||
|   // This can be used to avoid compiler constructed temporaries, since AMTL
 | ||||
|   // does not yet support move semantics. If you use this, the key and value
 | ||||
|   // must be set after.
 | ||||
|   bool add(Insert &i) { | ||||
|     return table_.add(i); | ||||
|   } | ||||
| 
 | ||||
|   size_t estimateMemoryUse() const { | ||||
|     return table_.estimateMemoryUse(); | ||||
|   } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user