mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 01:33:19 +00:00
Add helper lib for strings and vectors
This commit is contained in:
parent
6ef9740db9
commit
2bb7fcfcc6
10 changed files with 168 additions and 123 deletions
|
@ -5,6 +5,9 @@
|
|||
*/
|
||||
|
||||
#include "TasksView.h"
|
||||
#include "cpp-utils/vector.h"
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
namespace mirai {
|
||||
|
||||
|
@ -23,10 +26,10 @@ namespace mirai {
|
|||
tasksToShow.clear();
|
||||
for (auto& file : *files) {
|
||||
for (auto& task : file.getTasks()) {
|
||||
if (tagsFilter.size() != 0
|
||||
&& std::find_if(tagsFilter.begin(), tagsFilter.end(), [&](const std::string& tag) {
|
||||
std::function<bool(const std::string&)> f = [&](const std::string& tag) {
|
||||
return task->hasTag(tag);
|
||||
}) == tagsFilter.end())
|
||||
};
|
||||
if (tagsFilter.size() > 0 && !vectorUtils::containsAll(tagsFilter, task->getTags()))
|
||||
continue;
|
||||
tasksToShow.push_back(task.get());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue