Quote:
Originally Posted by knc1
Code:
frames_to_deliver = frames_to_deliver > 4096 ? 4096 : frames_to_deliver;
First, do a quick re-write of that statement then re-run it.
Why?
There was a recent GCC bug fixed in the ARM arch for "wrong code generation" from that construct.
Quicker to just re-write it and re-test than run down all of the who/what/when/why of the bug.
|
Ah. Okay thanks. Ternary to be binned. noted.
I'll give it another pop then
I went with
Code:
if (frames_to_deliver > 4096)
{frames_to_deliver = 4096;}
Seemed rather pointless as a construct all in.
EDIT: It didn't help, but good catch anyways. Frankly I'm not so keen on this second example.
The first one is much more robust.