summaryrefslogtreecommitdiff
path: root/Build/source/texk/lcdf-typetools/lcdf-typetools-2.103/include/lcdf/hashcode.hh
blob: 53a0e4289898a3380b914412ce5b96480560fc26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef LCDF_HASHCODE_HH
#define LCDF_HASHCODE_HH
#include <stddef.h>

typedef size_t hashcode_t;	///< Typical type for a hashcode() value.

inline hashcode_t
hashcode(int x)
{
    return static_cast<hashcode_t>(x);
}

inline hashcode_t
hashcode(unsigned x)
{
    return static_cast<hashcode_t>(x);
}

inline hashcode_t
hashcode(long x)
{
    return static_cast<hashcode_t>(x);
}

inline hashcode_t
hashcode(unsigned long x)
{
    return static_cast<hashcode_t>(x);
}

#endif