Browse Source

IcalObject methods are const

main
Stefan Pranger 3 years ago
parent
commit
2241481f27
  1. 4
      ical/IcalObject.cpp
  2. 4
      ical/IcalObject.h

4
ical/IcalObject.cpp

@ -5,11 +5,11 @@ namespace ical {
events.push_back(event); events.push_back(event);
} }
std::vector<ical::Event*> IcalObject::get_events() {
std::vector<ical::Event*> IcalObject::get_events() const {
return events; return events;
} }
bool IcalObject::empty() {
bool IcalObject::empty() const {
return events.size() == 0; return events.size() == 0;
} }

4
ical/IcalObject.h

@ -12,8 +12,8 @@ namespace ical {
class IcalObject { class IcalObject {
public: public:
void add_event(ical::Event* event); void add_event(ical::Event* event);
std::vector<ical::Event*> get_events();
bool empty();
std::vector<ical::Event*> get_events() const;
bool empty() const;
friend std::ostream& operator<<(std::ostream &os, ical::IcalObject const &obj); friend std::ostream& operator<<(std::ostream &os, ical::IcalObject const &obj);
private: private:

Loading…
Cancel
Save