Archived issue #0023373
MSVC++ warnings issued during compilation for 64bits, 'Sparse Arrays'
Description
Standard_Integer should be replaced with Standard_Size to avoid compiler warnings.
Additional information
Remark for release notes: interface of the class NCollection_SparseArray has changed to use Standard_Size (unsigned) for index, instead of Standard_Integer; the applications that use that class will likely need update (at least, to avoid compiler warnings)
Public activity
5 archived notes
Participants are labeled by their role within this record.
Corresponding git branch pushed. Please review.
Not fully reviewed but please notice that some portions of code may become incorrect due to signed (Standard_Integer) -> unsigned (Standard_Size) conversion like in this place:
>Standard_Address NCollection_SparseArrayBase::setValue (const Standard_Size theIndex,
> const Standard_Address theValue)
> {
> Standard_OutOfRange_Raise_if (theIndex<0,"NCollection_SparseArray::SetValue()")
>Standard_Address NCollection_SparseArrayBase::setValue (const Standard_Size theIndex,
> const Standard_Address theValue)
> {
> Standard_OutOfRange_Raise_if (theIndex<0,"NCollection_SparseArray::SetValue()")
Thanks for your hints!
I have updated and pushed the branch CR23373.
In my opinion the check 'Standard_OutOfRange_Raise_if' was not necessary anymore so I removed it.
I have also removed redundant casting to 'Standard_Size' and checking if a 'Standard_Size' variable was negative.
I have updated and pushed the branch CR23373.
In my opinion the check 'Standard_OutOfRange_Raise_if' was not necessary anymore so I removed it.
I have also removed redundant casting to 'Standard_Size' and checking if a 'Standard_Size' variable was negative.
Reviewed, please test.
Dear Commenter 3,
Branch CR23373 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
Regression:
Not detected
Improvements:
Not detected
Testing case:
Not needed
Branch CR23373 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
Regression:
Not detected
Improvements:
Not detected
Testing case:
Not needed
Related records