1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

remove unnecessary goto

which is a bit of a shame
This commit is contained in:
still-flow 2020-05-30 16:44:46 +03:00
parent 72008a7e85
commit d6de73a1dc

View File

@ -248,17 +248,15 @@ int main(int argc, char **argv) {
while (!finished)
for (auto & worker : workers) {
check_lollygagging:
if (worker.valid()) {
if (worker.wait_for(quantum) != future_status::ready) continue;
else {
int res = worker.get();
if (res) { printf("compilation error!\n"); exit(1); }
++tasks_done;
goto check_lollygagging;
}
}
else if (tasks_taken < tasks_amt) {
if (tasks_taken < tasks_amt) {
auto task = tasks[tasks_taken];
int mid = task.first;
function<int(void)> do_work = task.second;