Remove unused code, move logic from .h to their .cpp, clean some things

This commit is contained in:
Vyn 2024-09-02 11:52:06 +02:00
parent 924e35ecc4
commit cb6c663833
41 changed files with 492 additions and 978 deletions

View file

@ -5,7 +5,7 @@
*/
#include "Day.h"
#include "BaseResource.h"
#include "BaseSource.h"
#include <algorithm>
#include <iostream>
#include <memory>
@ -15,7 +15,7 @@
namespace mirai
{
Day::Day(BaseResource *source, const DayData &data) : source_(source), data_(data)
Day::Day(BaseSource *source, const DayData &data) : source_(source), data_(data)
{
}
@ -86,4 +86,19 @@ std::vector<std::unique_ptr<TaskItem>> *Day::tasks()
{
return &tasks_;
}
Event *Day::getEventById(int eventId)
{
for (auto &event : events_) {
if (event->id() == eventId) {
return event.get();
}
}
return nullptr;
}
BaseSource *Day::source()
{
return source_;
}
} // namespace mirai