Ignore:
Timestamp:
Nov 22, 2012, 9:31:18 AM (8 years ago)
Author:
sam
Message:

core: make hash operators const.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/hash.cpp

    r2105 r2107  
    8888 */
    8989
    90 uint32_t Hash<int8_t>::operator ()(int8_t x)
     90uint32_t Hash<int8_t>::operator ()(int8_t x) const
    9191{
    9292    return Hash8((uint8_t)x);
    9393}
    9494
    95 uint32_t Hash<uint8_t>::operator ()(uint8_t x)
     95uint32_t Hash<uint8_t>::operator ()(uint8_t x) const
    9696{
    9797    return Hash8(x);
    9898}
    9999
    100 uint32_t Hash<int16_t>::operator ()(int16_t x)
     100uint32_t Hash<int16_t>::operator ()(int16_t x) const
    101101{
    102102    return Hash16((uint16_t)x);
    103103}
    104104
    105 uint32_t Hash<uint16_t>::operator ()(uint16_t x)
     105uint32_t Hash<uint16_t>::operator ()(uint16_t x) const
    106106{
    107107    return Hash16(x);
    108108}
    109109
    110 uint32_t Hash<int32_t>::operator ()(int32_t x)
     110uint32_t Hash<int32_t>::operator ()(int32_t x) const
    111111{
    112112    return Hash32((uint32_t)x);
    113113}
    114114
    115 uint32_t Hash<uint32_t>::operator ()(uint32_t x)
     115uint32_t Hash<uint32_t>::operator ()(uint32_t x) const
    116116{
    117117    return Hash32(x);
    118118}
    119119
    120 uint32_t Hash<int64_t>::operator ()(int64_t x)
     120uint32_t Hash<int64_t>::operator ()(int64_t x) const
    121121{
    122122    return Hash64((uint64_t)x);
    123123}
    124124
    125 uint32_t Hash<uint64_t>::operator ()(uint64_t x)
     125uint32_t Hash<uint64_t>::operator ()(uint64_t x) const
    126126{
    127127    return Hash64(x);
     
    132132 */
    133133
    134 uint32_t Hash<half>::operator ()(half f)
     134uint32_t Hash<half>::operator ()(half f) const
    135135{
    136136    return Hash16(f.bits);
    137137}
    138138
    139 uint32_t Hash<float>::operator ()(float f)
     139uint32_t Hash<float>::operator ()(float f) const
    140140{
    141141    union { float tmp; uint32_t x; } u = { f };
     
    143143}
    144144
    145 uint32_t Hash<double>::operator ()(double f)
     145uint32_t Hash<double>::operator ()(double f) const
    146146{
    147147    union { double tmp; uint64_t x; } u = { f };
     
    163163}
    164164
    165 uint32_t Hash<char const *>::operator ()(char const *s)
     165uint32_t Hash<char const *>::operator ()(char const *s) const
    166166{
    167167    return HashCharString(s);
    168168}
    169169
    170 uint32_t Hash<String>::operator ()(String const &s)
     170uint32_t Hash<String>::operator ()(String const &s) const
    171171{
    172172    return HashCharString(&s[0]);
Note: See TracChangeset for help on using the changeset viewer.