[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / Hashable.cpp
blob94c25faf1c8697637990eb5950c7039726adaada
1 //$Id: Hashable.cpp 80826 2008-03-04 14:51:23Z wotte $
3 #include "ace/Hashable.h"
5 #if !defined (__ACE_INLINE__)
6 #include "ace/Hashable.inl"
7 #endif /* __ACE_INLINE __ */
10 ACE_RCSID (ace,
11 Hashable,
12 "$Id: Hashable.cpp 80826 2008-03-04 14:51:23Z wotte $")
15 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
17 ACE_Hashable::~ACE_Hashable (void)
21 unsigned long
22 ACE_Hashable::hash (void) const
24 // In doing the check below, we take chance of paying a performance
25 // price when the hash value is zero. But, that will (hopefully)
26 // happen far less often than a non-zero value, so this caching
27 // strategy should pay off, esp. if hash computation is expensive
28 // relative to the simple comparison.
30 if (this->hash_value_ == 0)
31 this->hash_value_ = this->hash_i ();
33 return this->hash_value_;
36 ACE_END_VERSIONED_NAMESPACE_DECL