mirror of
https://github.com/jorenchik/testing-spring-2024.git
synced 2025-10-21 20:10:36 +00:00
feat: removed push initialization of vectors
This commit is contained in:
parent
423669ab42
commit
cb7927a6fc
@ -18,16 +18,10 @@ bool Action::operator==(const Action &other) const {
|
|||||||
return this->name == other.name;
|
return this->name == other.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
Role::Role(std::initializer_list<Action> actions) {
|
Role::Role(std::initializer_list<Action> actions): Role(std::vector<Action>(actions)) {
|
||||||
for (auto &a : actions) {
|
|
||||||
this->actions.push_back(a);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Role::Role(std::vector<Action> actions) {
|
Role::Role(std::vector<Action> actions): actions(actions) {
|
||||||
for (auto &a : actions) {
|
|
||||||
this->actions.push_back(a);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Player::Player(uint32_t id, std::string username, Role role, PlayerStatus playerStatus):
|
Player::Player(uint32_t id, std::string username, Role role, PlayerStatus playerStatus):
|
||||||
@ -68,14 +62,10 @@ Event::Event(std::string title,
|
|||||||
title(title),
|
title(title),
|
||||||
utcTimestampCreatedAt(createUTCTimestamp(utcTimestampCreatedAt)),
|
utcTimestampCreatedAt(createUTCTimestamp(utcTimestampCreatedAt)),
|
||||||
numberNight(numberNight),
|
numberNight(numberNight),
|
||||||
isVisible(isVisible) {
|
isVisible(isVisible),
|
||||||
|
prohibits(prohibits),
|
||||||
|
allows(allows) {
|
||||||
this->utcTimestampCreatedAt = createUTCTimestamp(utcTimestampCreatedAt);
|
this->utcTimestampCreatedAt = createUTCTimestamp(utcTimestampCreatedAt);
|
||||||
for (auto &a : prohibits) {
|
|
||||||
this->prohibits.push_back(a);
|
|
||||||
}
|
|
||||||
for (auto &a : allows) {
|
|
||||||
this->allows.push_back(a);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::Event(std::string title,
|
Event::Event(std::string title,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user