epics-base / pvDataCPP

pvDataCPP is an EPICS V4 C++ module
https://epics-base.github.io/pvDataCPP/
Other
6 stars 16 forks source link

Replace template getSubField with template version #39

Closed dhickin closed 8 years ago

dhickin commented 8 years ago

Replace non-template getSubField with template version when PVField is of a known, derived type.

As per #34,but only do for derived classes. Avoid getSubField<PVField> as the dynamic_pointer_cast is not (as you might think) a null op. Especially avoid in the offset version as this can lead to several unnecessary pointer casts (see discussion in #34). In #34 there are sometimes more appropriate types for the template argument so use these.

dhickin commented 8 years ago

retest this please