More const ref for passing complex types

parent 57e5bca2
......@@ -30,7 +30,7 @@
#include "../../script/scriptlogger.h"
EnumDataInformation::EnumDataInformation(const QString& name, PrimitiveDataInformation* type,
EnumDefinition::Ptr enumDef, DataInformation* parent)
const EnumDefinition::Ptr& enumDef, DataInformation* parent)
: PrimitiveDataInformationWrapper(name, type, parent), mEnum(enumDef)
{
Q_CHECK_PTR(type);
......
......@@ -32,7 +32,7 @@ class EnumDataInformation: public PrimitiveDataInformationWrapper
public:
/** this object takes ownership of @p type */
EnumDataInformation(const QString& name, PrimitiveDataInformation* type,
EnumDefinition::Ptr enumDef, DataInformation* parent = nullptr);
const EnumDefinition::Ptr& enumDef, DataInformation* parent = nullptr);
~EnumDataInformation() override;
bool isEnum() const override;
......
......@@ -28,7 +28,7 @@
FlagDataInformation::FlagDataInformation(const QString& name, PrimitiveDataInformation* type,
EnumDefinition::Ptr enumDef, DataInformation* parent)
const EnumDefinition::Ptr& enumDef, DataInformation* parent)
: EnumDataInformation(name, type, enumDef, parent)
{
Q_ASSERT_X(type->type() != Type_Double && type->type() != Type_Float && type->type() != Type_Invalid,
......
......@@ -30,7 +30,7 @@ class FlagDataInformation : public EnumDataInformation
{
DATAINFORMATION_CLONE(FlagDataInformation, EnumDataInformation) {}
public:
FlagDataInformation(const QString& name, PrimitiveDataInformation* type, EnumDefinition::Ptr enumDef,
FlagDataInformation(const QString& name, PrimitiveDataInformation* type, const EnumDefinition::Ptr& enumDef,
DataInformation* parent = nullptr);
private:
QString valueStringImpl() const override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment