occt: master 467e864a

Author Committer Branch Timestamp Parent
tiv bugmaster master 2019-09-24 13:42:21 master 0a5ec5f3
Affected Issues  0030720: Coding - fix HashCode() function problems that are not resolved with 30550
Changeset 0030720: Coding - fix HashCode() function problems that are not resolved with 30550

Undefined behavior caused by left shift operations in TopLoc_Location::HashCode() function is fixed.
HashCode() function overload for Standard_Size type is made available only if Standard_Size and "unsigned int" are different types (it is usually true for 64-bit platforms). The overload for "unsigned int" is made simple non-templated function (so it behaves the same on 32-bit and 64-bit platforms).
HashCode() function overload for Standard_Utf32Char type is made available only if Standard_Utf32Char and "unsigned int" are different types (it is needed for some old compilers).
mod - src/Standard/Standard_Integer.hxx Diff File
mod - src/Standard/Standard_Size.hxx Diff File
mod - src/TopLoc/TopLoc_Location.cxx Diff File