PVStructure::getStructure() avoid creation of temporary

avoid some ref-counter activity
This commit is contained in:
Michael Davidsaver
2017-07-07 14:39:25 +02:00
parent 0de3c089d2
commit 9fa5028f6c
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ void PVStructure::setImmutable()
PVField::setImmutable();
}
StructureConstPtr PVStructure::getStructure() const
const StructureConstPtr& PVStructure::getStructure() const
{
return structurePtr;
}

View File

@@ -756,7 +756,7 @@ public:
* Get the introspection interface
* @return The interface.
*/
StructureConstPtr getStructure() const;
const StructureConstPtr &getStructure() const;
/**
* Get the array of pointers to the subfields in the structure.
* @return The array.