Archived issue #0020594
Bug in TColStd_PackedMapOfInteger regarding storage of negative values
Description
When a negative key is put in TColStd_PackedMapOfInteger it is available in the
container by iteration, but there are several incorrect scenarios of behavior:
- method Add with the same value always returns true, as if this key is being
put to the map for the first time, and the map extent incremented each time.
- method Contains says there is no such key in the map.
- method Remove does not remove such key from the map.
- boolean methods work incorrectly as well.
The test program is attached here.
container by iteration, but there are several incorrect scenarios of behavior:
- method Add with the same value always returns true, as if this key is being
put to the map for the first time, and the map extent incremented each time.
- method Contains says there is no such key in the map.
- method Remove does not remove such key from the map.
- boolean methods work incorrectly as well.
The test program is attached here.
Additional information
Documentation remark, added by Author 2008-12-12 10:20:26:
Improvements:
Foundation classes.
The class TColStd_PackedMapOfInteger had a bug leading to incorrect work with
negative keys. This bug has been fixed.
Improvements:
Foundation classes.
The class TColStd_PackedMapOfInteger had a bug leading to incorrect work with
negative keys. This bug has been fixed.
Public activity
No public notes
Participants are labeled by their role within this record.