mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-13 03:30:56 +08:00
0032495: Coding rules - eliminate CLang UndefinedBehaviorSanitizer warnings
- fixed CLang UndefinedBehaviorSanitizer warnings
This commit is contained in:
@@ -390,11 +390,10 @@ public:
|
||||
const Standard_Boolean theToCopyData)
|
||||
{
|
||||
Standard_RangeError_Raise_if (theUpper < theLower, "NCollection_Array1::Resize");
|
||||
const Standard_Integer anOldLen = Length();
|
||||
const Standard_Integer aNewLen = theUpper - theLower + 1;
|
||||
const Standard_Integer aLowerOld = myLowerBound;
|
||||
const Standard_Integer anOldLen = Length();
|
||||
const Standard_Integer aNewLen = theUpper - theLower + 1;
|
||||
|
||||
TheItemType* aBeginOld = &myData[aLowerOld];
|
||||
TheItemType* aBeginOld = myData != NULL ? &myData[myLowerBound] : NULL;
|
||||
myLowerBound = theLower;
|
||||
myUpperBound = theUpper;
|
||||
if (aNewLen == anOldLen)
|
||||
|
||||
Reference in New Issue
Block a user