Feature #34

Remove the HashMapTraits and use a less or hash function if possible

Added by vl almost 7 years ago. Updated almost 5 years ago.

Status:New Start date:09/03/2008
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-

Description

Currently, we created Trait classes for hash map like this :

// Traits for hash_map using CEntityId
struct CUCStringHashMapTraits {
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
CUCStringHashMapTraits() { }
size_t operator() (const ucstring &id ) const {
return id.size();
}
bool operator() (const ucstring &id1, const ucstring &id2) const {
return id1.size() < id2.size();
}
};

But in fact, it should work by only defining a less() hash() function and in this case we don't have to specify the traits each time we create a hashmap

History

#1 Updated by sfb about 6 years ago

  • Category set to Misc
  • Target version set to 0.8.0

Setting the target version for this to 0.8.0 - it would be nice to eliminate custom hashers.

#2 Updated by kervala almost 5 years ago

  • Project changed from NeL to Ryzom
  • Category deleted (Misc)
  • Target version deleted (0.8.0)

Also available in: Atom PDF