changes for PVStructureArray

This commit is contained in:
Marty Kraimer
2012-07-08 12:51:46 -04:00
parent 5d6205cb44
commit 32790674d6
3 changed files with 14 additions and 28 deletions

View File

@@ -178,19 +178,19 @@ void PVStructureArray::deserialize(ByteBuffer *pbuffer,
if(size>=0) {
// prepare array, if necessary
if(size>getCapacity()) setCapacity(size);
PVStructurePtrArray pvArray = *value.get();
PVStructurePtrArray *pvArray = value.get();
for(size_t i = 0; i<size; i++) {
pcontrol->ensureData(1);
size_t temp = pbuffer->getByte();
if(temp==0) {
pvArray[i].reset();
(*pvArray)[i].reset();
}
else {
if(pvArray[i].get()==NULL) {
if((*pvArray)[i].get()==NULL) {
StructureConstPtr structure = structureArray->getStructure();
pvArray[i] = getPVDataCreate()->createPVStructure(structure);
(*pvArray)[i] = getPVDataCreate()->createPVStructure(structure);
}
pvArray[i]->deserialize(pbuffer, pcontrol);
(*pvArray)[i]->deserialize(pbuffer, pcontrol);
}
}
setLength(size);