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:
parent
d1a2ed63c0
commit
10396ff435
|
@ -45,7 +45,6 @@
|
||||||
#include <tool/action_manager.h>
|
#include <tool/action_manager.h>
|
||||||
|
|
||||||
#include <wxPcbStruct.h>
|
#include <wxPcbStruct.h>
|
||||||
#include <confirm.h>
|
|
||||||
#include <class_draw_panel_gal.h>
|
#include <class_draw_panel_gal.h>
|
||||||
|
|
||||||
using boost::optional;
|
using boost::optional;
|
||||||
|
@ -437,7 +436,7 @@ void TOOL_MANAGER::InitTools()
|
||||||
|
|
||||||
if( !tool->Init() )
|
if( !tool->Init() )
|
||||||
{
|
{
|
||||||
DisplayError( nullptr,
|
wxMessageBox(
|
||||||
wxString::Format( "Initialization of tool '%s' failed", tool->GetName() ) );
|
wxString::Format( "Initialization of tool '%s' failed", tool->GetName() ) );
|
||||||
|
|
||||||
// Unregister the tool
|
// Unregister the tool
|
||||||
|
@ -500,7 +499,7 @@ optional<TOOL_EVENT> TOOL_MANAGER::ScheduleWait( TOOL_BASE* aTool,
|
||||||
st->waitEvents = aConditions;
|
st->waitEvents = aConditions;
|
||||||
|
|
||||||
// switch context back to event dispatcher loop
|
// switch context back to event dispatcher loop
|
||||||
st->cofunc->Yield();
|
st->cofunc->KiYield();
|
||||||
|
|
||||||
return st->wakeupEvent;
|
return st->wakeupEvent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,24 +208,24 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Function Yield()
|
* Function KiYield()
|
||||||
*
|
*
|
||||||
* Stops execution of the coroutine and returns control to the caller.
|
* Stops execution of the coroutine and returns control to the caller.
|
||||||
* After a yield, Call() or Resume() methods invoked by the caller will
|
* After a yield, Call() or Resume() methods invoked by the caller will
|
||||||
* immediately return true, indicating that we are not done yet, just asleep.
|
* immediately return true, indicating that we are not done yet, just asleep.
|
||||||
*/
|
*/
|
||||||
void Yield()
|
void KiYield()
|
||||||
{
|
{
|
||||||
jumpOut();
|
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.
|
* Useful for implementing generator objects.
|
||||||
*/
|
*/
|
||||||
void Yield( ReturnType& aRetVal )
|
void KiYield( ReturnType& aRetVal )
|
||||||
{
|
{
|
||||||
m_retVal = aRetVal;
|
m_retVal = aRetVal;
|
||||||
jumpOut();
|
jumpOut();
|
||||||
|
|
Loading…
Reference in New Issue