Add char* overload for non-template getSubField
This commit is contained in:
@@ -104,9 +104,9 @@ const PVFieldPtrArray & PVStructure::getPVFields() const
|
||||
return pvFields;
|
||||
}
|
||||
|
||||
PVFieldPtr PVStructure::getSubField(string const &fieldName) const
|
||||
PVFieldPtr PVStructure::getSubField(const char * fieldName) const
|
||||
{
|
||||
PVField * field = getSubFieldImpl(fieldName.c_str(), false);
|
||||
PVField * field = getSubFieldImpl(fieldName, false);
|
||||
if (field)
|
||||
return field->shared_from_this();
|
||||
else
|
||||
|
||||
@@ -702,7 +702,12 @@ public:
|
||||
* @param fieldName The name of the field.
|
||||
* @return Pointer to the field or null if field does not exist.
|
||||
*/
|
||||
PVFieldPtr getSubField(std::string const &fieldName) const;
|
||||
FORCE_INLINE PVFieldPtr getSubField(std::string const &fieldName) const
|
||||
{
|
||||
return getSubField(fieldName.c_str());
|
||||
}
|
||||
|
||||
PVFieldPtr getSubField(const char *fieldName) const;
|
||||
|
||||
/**
|
||||
* Get a subfield with the specified name.
|
||||
|
||||
Reference in New Issue
Block a user