diff options
Autocommit at 07.05.2022 @ 09:07
5 files changed, 4 insertions, 11 deletions
| -rw-r--r-- | src/Models/Reservation.cpp | 9 | ||||
| -rw-r--r-- | src/Models/Reservation.h | 1 | ||||
| -rw-r--r-- | src/Services/EventService.cpp (renamed from src/Services/EventSystem.cpp) | 0 | ||||
| -rw-r--r-- | src/Services/EventService.h (renamed from src/Services/EventSystem.h) | 0 | ||||
| -rw-r--r-- | src/main.cpp | 5 |
diff --git a/src/Models/Reservation.cpp b/src/Models/Reservation.cpp index 26278b2..50febd3 100644 --- a/src/Models/Reservation.cpp +++ b/src/Models/Reservation.cpp @@ -1,6 +1,5 @@ #include "Reservation.h" #include <cstring> -#include <ostream> Reservation::Reservation() : Reservation(Ticket(), "", "") {} @@ -8,12 +7,8 @@ Reservation::Reservation(const Ticket& ticket) : Reservation(ticket, "", "") {} Reservation::Reservation(const Ticket& ticket, const char* password, const char* note) { this->ticket = ticket; - strcpy(this->password, password); - strcpy(this->note, note); -} - -bool Reservation::validPassword(const char* password) const { - return !strcmp(this->password, password); + strncpy(this->password, password, PASSWORD_LEN); + strncpy(this->note, note, NOTE_LEN); } const Ticket& Reservation::get_ticket() const { diff --git a/src/Models/Reservation.h b/src/Models/Reservation.h index 1a415b5..936b6b5 100644 --- a/src/Models/Reservation.h +++ b/src/Models/Reservation.h @@ -18,7 +18,6 @@ public: Reservation(const Ticket& ticket); Reservation(const Ticket& ticket, const char* password, const char* note); - bool validPassword(const char* password) const; const Ticket& get_ticket() const; void read(std::istream& istr); diff --git a/src/Services/EventSystem.cpp b/src/Services/EventService.cpp index 95bd1c4..95bd1c4 100644 --- a/src/Services/EventSystem.cpp +++ b/src/Services/EventService.cpp diff --git a/src/Services/EventSystem.h b/src/Services/EventService.h index 4eeac61..4eeac61 100644 --- a/src/Services/EventSystem.h +++ b/src/Services/EventService.h diff --git a/src/main.cpp b/src/main.cpp index 8575d3b..ca47c56 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,5 @@ -#include "VenueConsoleUI.h" -#include "Venue/Venue.h" -#include "Venue/Hall.h" +#include "UserInterface/VenueConsoleUI.h" +#include "Models/Hall.h" int main() { Hall myVenueHalls[] = { Hall(1, 20, 30), Hall(2, 15, 15), Hall(3, 10, 20) }; |
