Using const ref parameter

This commit is contained in:
Pål Hagen 2015-10-19 14:50:01 +02:00
parent 344e7679d7
commit 7e1ef99146

View File

@ -50,12 +50,12 @@ template <typename T>
class RiuTypedObjectsFromObjectGroupGetter
{
public:
RiuTypedObjectsFromObjectGroupGetter(caf::PdmObjectGroup& objectGroup)
RiuTypedObjectsFromObjectGroupGetter(const caf::PdmObjectGroup& objectGroup)
{
objectGroup.objectsByType(&m_typedObjects);
}
static std::vector<T*> typedObjectsFromGroup(caf::PdmObjectGroup& objectGroup)
static std::vector<T*> typedObjectsFromGroup(const caf::PdmObjectGroup& objectGroup)
{
RiuTypedObjectsFromObjectGroupGetter<T> typedObjectsGetter(objectGroup);
return typedObjectsGetter.typedObjects();