adapt to PVStructure const propagation

This commit is contained in:
Michael Davidsaver
2017-08-08 16:52:11 +02:00
parent 35d9ef9f19
commit 6ace47a55a

View File

@@ -105,11 +105,11 @@ std::ostream& terse(std::ostream& o, PVField::shared_pointer const & pv)
std::ostream& printEnumT(std::ostream& o, epics::pvData::PVStructure const & pvEnumT)
{
PVInt::shared_pointer pvIndex = pvEnumT.getSubField<PVInt>("index");
PVInt::const_shared_pointer pvIndex = pvEnumT.getSubField<PVInt>("index");
if (!pvIndex)
throw std::runtime_error("enum_t structure does not have 'int index' field");
PVStringArray::shared_pointer pvChoices = pvEnumT.getSubField<PVStringArray>("choices");
PVStringArray::const_shared_pointer pvChoices = pvEnumT.getSubField<PVStringArray>("choices");
if (!pvChoices)
throw std::runtime_error("enum_t structure does not have 'string choices[]' field");