Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Attribute.h #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Attribute
string name;
//Attribute generation probability
int prob;
Attribute(string, int);
Attribute( const string &, int);
//Checks attribute probability and generate is accordingly
virtual string make_random() = 0;
};
Expand All @@ -25,7 +25,7 @@ class Attribute
class BooleanAttribute : public Attribute
{
public:
BooleanAttribute(string, int);
BooleanAttribute(const string&, int);
string make_random();
};

Expand All @@ -35,7 +35,7 @@ class MultiChoiceAttribute : public Attribute
public:
//stores various options of attributes e.g. visibility options - default, hidden, internal and protected
vector<string> choices;
MultiChoiceAttribute(string, int, vector<string>);
MultiChoiceAttribute(const string &, int, vector<string>);
string make_random();
};

Expand All @@ -45,15 +45,15 @@ class AlignedAttribute : public Attribute
public:
//alignment factor - [functions] = 16 and [types] = 8 i.e. functions can take alignment upto 2^16 where as type can take upto 2^8
int alignment;
AlignedAttribute(string, int, int);
AlignedAttribute(const string &, int, int);
string make_random();
};

//Generates usersections to put functions in different sections
class SectionAttribute : public Attribute
{
public:
SectionAttribute(string, int);
SectionAttribute( const string &, int);
string make_random();
};

Expand Down