| 1 |
#ifndef LCDF_HASHCODE_HH |
| 2 |
#define LCDF_HASHCODE_HH |
| 3 |
#include <stddef.h> |
| 4 |
|
| 5 |
typedef size_t hashcode_t; ///< Typical type for a hashcode() value. |
| 6 |
|
| 7 |
inline hashcode_t |
| 8 |
hashcode(int x) |
| 9 |
{ |
| 10 |
return static_cast<hashcode_t>(x); |
| 11 |
} |
| 12 |
|
| 13 |
inline hashcode_t |
| 14 |
hashcode(unsigned x) |
| 15 |
{ |
| 16 |
return static_cast<hashcode_t>(x); |
| 17 |
} |
| 18 |
|
| 19 |
inline hashcode_t |
| 20 |
hashcode(long x) |
| 21 |
{ |
| 22 |
return static_cast<hashcode_t>(x); |
| 23 |
} |
| 24 |
|
| 25 |
inline hashcode_t |
| 26 |
hashcode(unsigned long x) |
| 27 |
{ |
| 28 |
return static_cast<hashcode_t>(x); |
| 29 |
} |
| 30 |
|
| 31 |
#endif |