use do while instead of for loop

This commit is contained in:
Ahmet Inan 2019-09-29 22:25:55 +02:00
commit bd3bf1d277
2 changed files with 6 additions and 6 deletions

View file

@ -161,13 +161,13 @@ class LDPCDecoder
shift[c] = (shift[c] + 1) % M;
}
std::sort(lo, lo + cnt, [](const Loc &a, const Loc &b){ return a.off < b.off; });
bool wd[deg];
bool wd[deg], repeat;
for (int d = 0; d < deg; ++d)
wd[d] = false;
for (int c = 1; c < cnt; ++c)
if (lo[c].off == lo[c-1].off)
wd[c] = true;
for (bool repeat = true; repeat;) {
do {
TYPE par[2];
if (i) {
par[0] = pty[W*(i-1)+j];
@ -217,7 +217,7 @@ class LDPCDecoder
repeat = true;
++c;
}
}
} while (repeat);
bl += deg;
}
}