13
13
14
14
namespace server {
15
15
16
- void TaskResolver::ownTask (TaskPtr&& newTask)
17
- {
16
+ void TaskResolver::ownTask (TaskPtr&& newTask) {
18
17
// pre-process task before adding, where we could quickly detect failure scenarios
19
18
for (const auto & task: m_tasks) {
20
19
if (task->cmd () == newTask->cmd ()) {
@@ -35,8 +34,7 @@ void TaskResolver::ownTask(TaskPtr&& newTask)
35
34
m_tasks.emplace_back (std::move (newTask));
36
35
}
37
36
38
- void TaskResolver::takeFinished (std::vector<TaskPtr>& result)
39
- {
37
+ void TaskResolver::takeFinished (std::vector<TaskPtr>& result) {
40
38
for (auto it=m_tasks.begin (); it != m_tasks.end ();) {
41
39
TaskPtr& task = *it;
42
40
if (task->isFinished ()) {
@@ -62,8 +60,7 @@ std::optional<e_timing_report_detail> TaskResolver::tryGetDetailsLevelEnum(const
62
60
return std::nullopt;
63
61
}
64
62
65
- bool TaskResolver::update (ezgl::application* app)
66
- {
63
+ bool TaskResolver::update (ezgl::application* app) {
67
64
bool has_processed_task = false ;
68
65
for (auto & task: m_tasks) {
69
66
if (!task->isFinished ()) {
@@ -86,8 +83,7 @@ bool TaskResolver::update(ezgl::application* app)
86
83
return has_processed_task;
87
84
}
88
85
89
- void TaskResolver::processGetPathListTask (ezgl::application*, const TaskPtr& task)
90
- {
86
+ void TaskResolver::processGetPathListTask (ezgl::application*, const TaskPtr& task) {
91
87
TelegramOptions options{task->options (), {comm::OPTION_PATH_NUM, comm::OPTION_PATH_TYPE, comm::OPTION_DETAILS_LEVEL, comm::OPTION_IS_FLAT_ROUTING}};
92
88
if (!options.hasErrors ()) {
93
89
ServerContext& server_ctx = g_vpr_ctx.mutable_server (); // shortcut
@@ -130,8 +126,7 @@ void TaskResolver::processGetPathListTask(ezgl::application*, const TaskPtr& tas
130
126
}
131
127
}
132
128
133
- void TaskResolver::processDrawCriticalPathTask (ezgl::application* app, const TaskPtr& task)
134
- {
129
+ void TaskResolver::processDrawCriticalPathTask (ezgl::application* app, const TaskPtr& task) {
135
130
TelegramOptions options{task->options (), {comm::OPTION_PATH_ELEMENTS, comm::OPTION_HIGHLIGHT_MODE, comm::OPTION_DRAW_PATH_CONTOUR}};
136
131
if (!options.hasErrors ()) {
137
132
ServerContext& server_ctx = g_vpr_ctx.mutable_server (); // shortcut
0 commit comments