DiscussionsIssue archiveOCCT:Foundation Classes

Archived issue #0013600

Hash code calculation of TopLoc_Location is incorrect on 64-bit platforms

Open CASCADEOCCT:Foundation Classesclosed0 public notes

Search issues

Description

If number of transformations is bigger than 10, the next transformations are
not used for hash code generation (only on 64bit platforms): calculations are
performed on usigned long (64 bits), but returned value is Standard_Integer (32
bits).

Bug is reproduced on SALOME gluing operation (bug IPAL 13563).

It is proposed to put patch for this bug into the version 6.1.1.

Fix is attached.

Additional information

Documentation remark, added by Author 2006-10-19 07:43:10:

Improvements:
Hash code of the TopLoc_Location on 64bits-platforms now calculated better. This
fix have no effect on 32bits-platforms because the sizes on 'usigned long' and
'usigned int' variables are the same (4 bytes).
Modified entities:
Attachment 1 (CXX) method TopLoc_Location::HashCode - changed all local
variables type from 'unsigned long' to 'unsigned int'

Public activity

No public notes

Participants are labeled by their role within this record.