Fixed unit NTTable test failure

This commit is contained in:
Dave Hickin
2015-08-20 18:32:18 +01:00
parent 399a39a20a
commit 59afc5335a

View File

@@ -88,12 +88,11 @@ NTTableBuilder::shared_pointer NTTableBuilder::addTimeStamp()
PVStructurePtr NTTableBuilder::createPVStructure()
{
PVStructurePtr s = getPVDataCreate()->createPVStructure(createStructure());
// fill in labels with default values (the column names)
size_t len = columnNames.size();
shared_vector<string> l(len);
for(size_t i=0; i<len; ++i) l[i] = columnNames[i];
PVStructurePtr s = getPVDataCreate()->createPVStructure(createStructure());
s->getSubField<PVStringArray>("labels")->replace(freeze(l));
return s;
}