Replace calls of deprecated subfield functions
The non-template functions for getting subfields of a PVStructure, such as PVStructure::getIntField were marked as deprecated in the 4.4 release and now generate build warnings. Replace calls of these functions with calls of the template function getSubField, e.g. getSubField<PVInt>.
This commit is contained in:
@@ -66,9 +66,9 @@ bool ExampleServer::init()
|
||||
|
||||
initPVRecord();
|
||||
PVFieldPtr pvField;
|
||||
pvArgumentValue = getPVStructure()->getStringField("argument.value");
|
||||
pvArgumentValue = getPVStructure()->getSubField<PVString>("argument.value");
|
||||
if(pvArgumentValue.get()==NULL) return false;
|
||||
pvResultValue = getPVStructure()->getStringField("result.value");
|
||||
pvResultValue = getPVStructure()->getSubField<PVString>("result.value");
|
||||
if(pvResultValue.get()==NULL) return false;
|
||||
pvTimeStamp.attach(getPVStructure()->getSubField("result.timeStamp"));
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user