From 0551e368236a644bd169a6f0760c55c4571fc8ba Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 6 May 2022 11:41:53 +0300 Subject: Autocommit at 06.05.2022 @ 11:41 --- src/Venue/Venue.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Venue/Venue.cpp') diff --git a/src/Venue/Venue.cpp b/src/Venue/Venue.cpp index 3185d7b..01c6a95 100644 --- a/src/Venue/Venue.cpp +++ b/src/Venue/Venue.cpp @@ -12,7 +12,7 @@ Venue::Venue(const Hall* halls, unsigned hallCount, const EventSystem& es) { } bool Venue::hallExists(unsigned hallIndex) const { - return hallIndex < halls.get_count(); + return halls.contain(Hall(hallIndex, 0, 0)); } bool Venue::hallExists(const Hall& hall) const { @@ -23,6 +23,10 @@ const List& Venue::get_halls() const { return this->halls; } +const Hall& Venue::getHall(unsigned hallIndex) const { + return this->halls[this->halls.findIndex(Hall(hallIndex, 0, 0))]; +} + EventSystem& Venue::get_es() { return this->es; } -- cgit v1.3.1-26-gb76a