Quote:
Originally Posted by joaquimandrade
Your it's wrong because you are doing a continue instead of let the looping run. So you are calling 10 times the command and just giving 10 comparisons.
|
This A result from your code, I profiled it.. Read more carefully my post ;)
And I can't undersatand what u a saying about
countinue. It let the loop run just makes i++.
and
break stops the loop.
PHP Code:
#define AddFlag(%1,%2) ( %1 |= ( 1 << (%2-1) ) )
#define RemoveFlag(%1,%2) ( %1 &= ~( 1 << (%2-1) ) )
#define CheckFlag(%1,%2) ( %1 & ( 1 << (%2-1) ) )
Wow that great! Thx
+k
but is this better?
PHP Code:
#define AddFlag(%1,%2) ( %1 |= ( 1 << (%2 % 32) ) )
#define RemoveFlag(%1,%2) ( %1 &= ~( 1 << (%2 % 32) ) )
#define CheckFlag(%1,%2) ( %1 & ( 1 << (%2 % 32) ) )
And I have a question..
For example a have bitsum var.. 1230 and 4000 bit A true..
So should I loop thougth all to find them?? Or maybe there is better way