PDA

View Full Version : is_null



zhongyue
04-06-2010, 05:25 AM
When I read the MainDocs:Template Callbacks,I found a small problem in the source code of windows version:
FILE:virtual_function_v2.h(as virtual_function_v3.h etc)
FUNC:
bool is_null() const
{
std::vector< CL_SharedPtr<CL_SlotCallback> >::reverse_iterator it = it_super;
while (it != it_end)
{
if (it->get()->valid && it->get()->enabled)
return true;
++it;
}
return false;
}
The function should like this:
bool is_null() const
{
std::vector< CL_SharedPtr<CL_SlotCallback> >::reverse_iterator it = it_super;
while (it != it_end)
{
if (it->get()->valid && it->get()->enabled)
return false;//!!!
++it;
}
return true;//!!!
}

Seth
04-10-2010, 02:49 AM
Thanks - actually I think this bugfix is for Clanlib 2.X, Novashell uses Clanlib 1.X only. But hopefully the 2.x guys will see this!

rombust
04-25-2010, 06:32 PM
Yeah, we have just seen it :)

It is a silly bug. Thanks for finding it.

I guess that nobody has used that function before ;)

ClanLib related questions should be posted in: http://www.rtsoft.com/forums/forumdisplay.php?f=13