diff options
Diffstat (limited to 'Build/source/texk/lcdf-typetools/lcdf-typetools-2.102/include/lcdf/hashcode.hh')
-rw-r--r-- | Build/source/texk/lcdf-typetools/lcdf-typetools-2.102/include/lcdf/hashcode.hh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.102/include/lcdf/hashcode.hh b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.102/include/lcdf/hashcode.hh new file mode 100644 index 00000000000..53a0e428989 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.102/include/lcdf/hashcode.hh @@ -0,0 +1,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 |