changed wxFDIODispatcher::UnregisterFD() to take only fd, without flags, and unregister it unconditionally; use ModifyFD() to just change the flags (modified part of patch 1733626)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -78,18 +78,13 @@ bool wxMappedFDIODispatcher::ModifyFD(int fd, wxFDIOHandler *handler, int flags)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxMappedFDIODispatcher::UnregisterFD(int fd, int flags)
|
||||
bool wxMappedFDIODispatcher::UnregisterFD(int fd)
|
||||
{
|
||||
wxFDIOHandlerMap::iterator i = m_handlers.find(fd);
|
||||
if( i == m_handlers.end())
|
||||
if ( i == m_handlers.end() )
|
||||
return false;
|
||||
|
||||
i->second.flags &= ~flags;
|
||||
if ( !i->second.flags )
|
||||
{
|
||||
// this handler is not registered for anything any more, get rid of it
|
||||
m_handlers.erase(i);
|
||||
}
|
||||
m_handlers.erase(i);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user