PVStructure::getNumberFields != Structure::getNumberFields
Apparently PVStructure::getNumberFields is one indexed???
This commit is contained in:
@@ -171,13 +171,15 @@ bool compareField(PVScalarArray* left, PVScalarArray* right)
|
|||||||
|
|
||||||
bool compareField(PVStructure* left, PVStructure* right)
|
bool compareField(PVStructure* left, PVStructure* right)
|
||||||
{
|
{
|
||||||
if(left->getStructure()!=right->getStructure())
|
StructureConstPtr ls = left->getStructure();
|
||||||
|
|
||||||
|
if(*ls!=*right->getStructure())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const PVFieldPtrArray& lf = left->getPVFields();
|
const PVFieldPtrArray& lf = left->getPVFields();
|
||||||
const PVFieldPtrArray& rf = right->getPVFields();
|
const PVFieldPtrArray& rf = right->getPVFields();
|
||||||
|
|
||||||
for(size_t i=0, nfld=left->getNumberFields(); i<nfld; i++) {
|
for(size_t i=0, nfld=ls->getNumberFields(); i<nfld; i++) {
|
||||||
if(*lf[i]!=*rf[i])
|
if(*lf[i]!=*rf[i])
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ void PrinterBase::impl_print(const PVField& pv)
|
|||||||
const PVFieldPtrArray& vals = fld.getPVFields();
|
const PVFieldPtrArray& vals = fld.getPVFields();
|
||||||
|
|
||||||
beginStructure(fld);
|
beginStructure(fld);
|
||||||
for(size_t i=0, nfld=fld.getNumberFields(); i<nfld; i++)
|
for(size_t i=0, nfld=fld.getStructure()->getNumberFields(); i<nfld; i++)
|
||||||
this->print(*vals[i]);
|
this->print(*vals[i]);
|
||||||
endStructure(fld);
|
endStructure(fld);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user