mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-16 13:20:33 +08:00
0003513: There is no check for boundary of array in method Set for array attributes
- Added check of array's boundary in Set(i, val) methods. - Added comments to cdl files. - removed accidental modification in TDataStd_ExtStringArray::Value(i). - recovering accidentally lost modifications.
This commit is contained in:
@@ -80,9 +80,9 @@ Handle(TDataStd_ReferenceArray) TDataStd_ReferenceArray::Set(const TDF_Label&
|
||||
void TDataStd_ReferenceArray::SetValue (const Standard_Integer index,
|
||||
const TDF_Label& value)
|
||||
{
|
||||
if(myArray.IsNull()) return;
|
||||
if (value == myArray->Value(index))
|
||||
return;
|
||||
|
||||
Backup();
|
||||
|
||||
myArray->SetValue(index, value);
|
||||
@@ -144,7 +144,7 @@ const Handle(TDataStd_HLabelArray1)& TDataStd_ReferenceArray::InternalArray () c
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void TDataStd_ReferenceArray::SetInternalArray (const Handle(TDataStd_HLabelArray1)& values,
|
||||
const Standard_Boolean /*isCheckItem*/)
|
||||
const Standard_Boolean isCheckItem)
|
||||
{
|
||||
// myArray = values;
|
||||
Standard_Integer aLower = values->Lower();
|
||||
|
||||
Reference in New Issue
Block a user