Browse Source

IcalObject methods are const

main
Stefan Pranger 4 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);
}
std::vector<ical::Event*> IcalObject::get_events() {
std::vector<ical::Event*> IcalObject::get_events() const {
return events;
}
bool IcalObject::empty() {
bool IcalObject::empty() const {
return events.size() == 0;
}

4
ical/IcalObject.h

@ -12,8 +12,8 @@ namespace ical {
class IcalObject {
public:
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);
private:

Loading…
Cancel
Save