if (!aLab.FindAttribute(TDataStd_ByteArray::GetID(), aData)) {
aData = TDataStd_ByteArray::Set(aLab, 1, theLen);
}
+ Standard_Byte* Byte0 = &(aData->InternalArray()->ChangeArray1().ChangeFirst());
+ memcpy(Byte0, theData, theLen * sizeof (char));
// copy bytes one by one
if (aData->Length() != theLen) {
Handle(TColStd_HArray1OfByte) aNewData = new TColStd_HArray1OfByte(1, theLen);
for(int a = 0; a < theLen; a++)
aNewData->SetValue(a + 1, theData[a]);
aData->ChangeArray(aNewData);
- } else {
- for(int a = 0; a < theLen; a++)
- aData->SetValue(a + 1, theData[a]);
+ }
+ else
+ {
+ // for(int a = 0; a < theLen; a++)
+ // aData->SetValue(a + 1, theData[a]);
}
}