From 05564ab71ebdadbb100ffac690d278c9982224f5 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 30 Mar 2016 21:41:08 -0300 Subject: Create a constructor for Alarm class. --- include/datetime/appointment.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/datetime') diff --git a/include/datetime/appointment.h b/include/datetime/appointment.h index 5b4c27e..14adb5d 100644 --- a/include/datetime/appointment.h +++ b/include/datetime/appointment.h @@ -42,7 +42,14 @@ struct Alarm std::string text; std::string audio_url; DateTime time; - int type; + int type = TEXT; + + Alarm(const std::string &text_, const std::string &audio_url_, const DateTime & time_, int type_ = TEXT) + : text(text_), audio_url(audio_url_), time(time_), type(type_) + {} + + Alarm() + {} bool operator== (const Alarm& that) const; bool has_sound() const; -- cgit v1.2.3