Tool manager: renames Yield() to KiYield(), due to a collision name between the Yield macro in wxWidgets and Tool manager Yield.

Can be dependent on platforms.
This commit is contained in:
jean-pierre charras 2017-02-23 08:30:29 +01:00
parent d1a2ed63c0
commit 10396ff435
2 changed files with 7 additions and 8 deletions

View File

@ -45,7 +45,6 @@
#include <tool/action_manager.h>
#include <wxPcbStruct.h>
#include <confirm.h>
#include <class_draw_panel_gal.h>
using boost::optional;
@ -437,7 +436,7 @@ void TOOL_MANAGER::InitTools()
if( !tool->Init() )
{
DisplayError( nullptr,
wxMessageBox(
wxString::Format( "Initialization of tool '%s' failed", tool->GetName() ) );
// Unregister the tool
@ -500,7 +499,7 @@ optional<TOOL_EVENT> TOOL_MANAGER::ScheduleWait( TOOL_BASE* aTool,
st->waitEvents = aConditions;
// switch context back to event dispatcher loop
st->cofunc->Yield();
st->cofunc->KiYield();
return st->wakeupEvent;
}

View File

@ -208,24 +208,24 @@ public:
public:
/**
* Function Yield()
* Function KiYield()
*
* Stops execution of the coroutine and returns control to the caller.
* After a yield, Call() or Resume() methods invoked by the caller will
* immediately return true, indicating that we are not done yet, just asleep.
*/
void Yield()
void KiYield()
{
jumpOut();
}
/**
* Function Yield()
* Function KiYield()
*
* Yield with a value - passes a value of given type to the caller.
* KiYield with a value - passes a value of given type to the caller.
* Useful for implementing generator objects.
*/
void Yield( ReturnType& aRetVal )
void KiYield( ReturnType& aRetVal )
{
m_retVal = aRetVal;
jumpOut();