Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Hashable.cpp
blob8afdd4c054d8f2549110ad105004b1c5896d44ff
1 #include "ace/Hashable.h"
3 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
5 unsigned long
6 ACE_Hashable::hash () const
8 // In doing the check below, we take chance of paying a performance
9 // price when the hash value is zero. But, that will (hopefully)
10 // happen far less often than a non-zero value, so this caching
11 // strategy should pay off, esp. if hash computation is expensive
12 // relative to the simple comparison.
14 if (this->hash_value_ == 0)
15 this->hash_value_ = this->hash_i ();
17 return this->hash_value_;
20 ACE_END_VERSIONED_NAMESPACE_DECL