Re: find_if and mem_fun not getting expected results
Turns out it was a compiler error. I'm not great at x86, but the
IsSelected function was only setting the low byte of eax to 0. Then
when it returned, eax was converted to 1 because the higher 3 bytes
had a non-zero value.
Changing IsSelected to return int fixed the problem.
This was using MSVC 7.1, by the way (I know, it's ancient).
|