mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 18:23:19 +00:00
Remove unused code, move logic from .h to their .cpp, clean some things
This commit is contained in:
parent
924e35ecc4
commit
cb6c663833
41 changed files with 492 additions and 978 deletions
19
external/mirai-core/src/Day.cpp
vendored
19
external/mirai-core/src/Day.cpp
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue