2 * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net.
3 * Distributed under the terms of the MIT License.
8 // find first (least significant) set bit
15 // ToDo: This can certainly be optimized (e.g. by binary search). Or not
16 // unlikely there's a single assembler instruction...
17 for (int i
= 1; i
<= (int)sizeof(value
) * 8; i
++, value
>>= 1) {