Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models
diff options
context:
space:
mode:
Commit18923a8c3a87aa1d7e4ef7c033d5359baeb390c8 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 08:56:57 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 08:56:57 +0300
Files02b811eb6a620b76e3f92129eb4620ab7d9faad0 /src/Models
FMI-OOP-P1_TicketSystem-18923a8c3a87aa1d7e4ef7c033d5359baeb390c8.tar
FMI-OOP-P1_TicketSystem-18923a8c3a87aa1d7e4ef7c033d5359baeb390c8.tar.gz
FMI-OOP-P1_TicketSystem-18923a8c3a87aa1d7e4ef7c033d5359baeb390c8.zip
Parentb756c1f1ca3dbbaae2a40e1119ac3ca3369dd067 (diff)
Autocommit at 07.05.2022 @ 08:56
2 files changed, 4 insertions, 4 deletions
-rw-r--r--src/Models/Event.cpp6
-rw-r--r--src/Models/Event.h2
diff --git a/src/Models/Event.cpp b/src/Models/Event.cpp
index d238ec2..f570fbf 100644
--- a/src/Models/Event.cpp
+++ b/src/Models/Event.cpp
@@ -1,10 +1,10 @@
#include "Event.h"
#include "Reservation.h"
-Event::Event() : Event(nullptr, "", Date()) {}
+Event::Event() : hall(), name(), date() {}
-Event::Event(const Hall* hall, String name, Date date) : tickets(), reservations() {
- this->hall = hall;
+Event::Event(const Hall& hall, String name, Date date) : tickets(), reservations() {
+ this->hall = &hall;
this->name = name;
this->date = date;
}
diff --git a/src/Models/Event.h b/src/Models/Event.h
index 87a21f4..4de2814 100644
--- a/src/Models/Event.h
+++ b/src/Models/Event.h
@@ -17,7 +17,7 @@ class Event {
public:
Event();
- Event(const Hall* hall, String name, Date date);
+ Event(const Hall& hall, String name, Date date);
const Hall& get_hall() const;
const String& get_name() const;