From e312132141a090f09b3f2ee04951084e484ad583 Mon Sep 17 00:00:00 2001 From: dcb314 Date: Thu, 26 Oct 2023 19:41:17 +0100 Subject: [PATCH] Update Attribute.cpp More cppcheck changes. --- src/Attribute.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Attribute.cpp b/src/Attribute.cpp index 0628b9e8d..6083afcaf 100644 --- a/src/Attribute.cpp +++ b/src/Attribute.cpp @@ -31,12 +31,12 @@ AttributeGenerator::Output(std::ostream &out) out << "))"; } -Attribute::Attribute(string name, int prob) +Attribute::Attribute(const string &name, int prob) : name(name), prob(prob) { } -BooleanAttribute::BooleanAttribute(string name, int prob) +BooleanAttribute::BooleanAttribute(const string &name, int prob) : Attribute(name, prob) { } @@ -50,7 +50,7 @@ BooleanAttribute::make_random() return ""; } -MultiChoiceAttribute::MultiChoiceAttribute(string name, int prob, vector arguments) +MultiChoiceAttribute::MultiChoiceAttribute(const string &name, int prob, vector arguments) : Attribute(name, prob), choices(arguments) { } @@ -64,7 +64,7 @@ MultiChoiceAttribute::make_random() return ""; } -AlignedAttribute::AlignedAttribute(string name, int prob, int alignment_factor) +AlignedAttribute::AlignedAttribute(const string &name, int prob, int alignment_factor) : Attribute(name, prob), alignment(alignment_factor) { } @@ -81,7 +81,7 @@ AlignedAttribute::make_random() return ""; } -SectionAttribute::SectionAttribute(string name, int prob) +SectionAttribute::SectionAttribute(const string &name, int prob) : Attribute(name, prob) { }