Commit f937bf69 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Refactor conv decode backtracking loop.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 0cb4466e
......@@ -123,16 +123,13 @@ conv_decode (const vector<int>& coded_bits)
}
}
size_t idx = error_count.size() - 1;
unsigned int state = 0;
do
for (size_t idx = error_count.size() - 1; idx > 0; idx--)
{
decoded_bits.push_back (error_count[idx][state].bit);
state = error_count[idx][state].last_state;
idx--;
}
while (idx > 0);
std::reverse (decoded_bits.begin(), decoded_bits.end());
/* remove termination */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment