2015-04-17 03:43 AM
2015-04-17 04:17 AM
if (a2 <= 32768 && ((a2 == 1) || ((((a2 - 1) << 1) & a2) == a2))) a = a2;
if (a1 <= 32768 && ((a1 == 1) || ((((a1 - 1) << 1) & a1) == a1))) a = (long)a1 << 16; JW2015-04-17 04:26 AM
Use else to eliminate pointless comparisons or switch/case?
Understand the purpose, and desired function better?2015-04-17 05:20 AM
This code
worked fine
if (a2 <= 32768 && ((a2 == 1) || ((((a2 - 1) << 1) & a2) == a2))) a = a2;
if (a1 <= 32768 && ((a1 == 1) || ((((a1 - 1) << 1) & a1) == a1))) a = (long)a1 << 16;
1kb
was
my wife.
thanks
all