fix bug related to PVStructurePtr createPVStructure(
StringArray const & fieldNames,PVFieldPtrArray const & pvFields); The old implementation created a new version of each element of pvField. The new version uses the version from pvFields. There is a new shared pointer but the new shared pointer referenced the same PVField as the original.
This commit is contained in:
@@ -652,10 +652,6 @@ PVStructurePtr PVDataCreate::createPVStructure(
|
||||
for (size_t i=0;i<num;i++) fields[i] = pvFields[i]->getField();
|
||||
StructureConstPtr structure = fieldCreate->createStructure(fieldNames,fields);
|
||||
PVStructurePtr pvStructure(new PVStructure(structure,pvFields));
|
||||
const PVFieldPtrArray & xxx = pvStructure->getPVFields();
|
||||
for(size_t i=0; i<pvFields.size();i++) {
|
||||
convert->copy(pvFields[i],xxx[i]);
|
||||
}
|
||||
return pvStructure;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user