File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,12 +92,16 @@ std::optional<Task> parse(const std::string& line) {
9292 return {};
9393}
9494
95- // Among the valid tasks from fileName, return the "best" which means with the smallest exponent
95+ // Among the valid tasks from fileName, return the "best" which means the smallest CERT, or otherwise the exponent PRP/LL
9696static std::optional<Task> bestTask (const fs::path& fileName) {
9797 optional<Task> best;
9898 for (const string& line : File::openRead (fileName)) {
9999 optional<Task> task = parse (line);
100- if (task && (!best || task->exponent < best->exponent )) { best = task; }
100+ if (task && (!best
101+ || (best->kind != Task::CERT && task->kind == Task::CERT)
102+ || ((best->kind != Task::CERT || task->kind == Task::CERT) && task->exponent < best->exponent ))) {
103+ best = task;
104+ }
101105 }
102106 return best;
103107}
You can’t perform that action at this time.
0 commit comments