Adds the concept of owning the table entries - before, they were always owned,
now it defaults to not-owning. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14823 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -20,7 +20,7 @@ class Hashable {
|
||||
|
||||
class HashTable {
|
||||
public:
|
||||
HashTable(int32 capacity = 100, float loadFactor = 0.75);
|
||||
HashTable(bool owning = false, int32 capacity = 100, float loadFactor = 0.75);
|
||||
~HashTable();
|
||||
|
||||
void MakeEmpty(bool deleteValues = true);
|
||||
@@ -42,6 +42,7 @@ class HashTable {
|
||||
entry** fTable;
|
||||
int32 fCapacity, fCount, fThreshold;
|
||||
float fLoadFactor;
|
||||
bool fOwning;
|
||||
};
|
||||
|
||||
#endif /* HASHTABLE_H */
|
||||
|
||||
Reference in New Issue
Block a user