From 3ddd28cfc90d9a744f7a7c2c2ab024d22faebe85 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 2 May 2022 20:10:06 +0300 Subject: Autocommit at 02.05.2022 @ 20:10 --- src/EventSystem/Reservation.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/EventSystem/Reservation.cpp') diff --git a/src/EventSystem/Reservation.cpp b/src/EventSystem/Reservation.cpp index 927b11a..ba12547 100644 --- a/src/EventSystem/Reservation.cpp +++ b/src/EventSystem/Reservation.cpp @@ -1,5 +1,6 @@ #include "Reservation.h" #include +#include Reservation::Reservation() : Reservation(Ticket(), "", "") {} @@ -11,6 +12,12 @@ Reservation::Reservation(const Ticket& ticket, const char* password, const char* void Reservation::read(std::istream& istr) { ticket.read(istr); - istr.read(password, sizeof(char) * 8); - istr.read(note, sizeof(char) * 32); + istr.read(password, sizeof(password)); + istr.read(note, sizeof(note)); +} + +void Reservation::write(std::ostream& ostr) const { + ticket.write(ostr); + ostr.write(password, sizeof(password)); + ostr.write(note, sizeof(note)); } -- cgit v1.3.1-23-gd82d