From 10396ff435b04100b9d85fb0c4c0812a65765f10 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 23 Feb 2017 08:30:29 +0100 Subject: [PATCH] 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. --- common/tool/tool_manager.cpp | 5 ++--- include/tool/coroutine.h | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 78221e7c4f..28b9957efe 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -45,7 +45,6 @@ #include #include -#include #include 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_MANAGER::ScheduleWait( TOOL_BASE* aTool, st->waitEvents = aConditions; // switch context back to event dispatcher loop - st->cofunc->Yield(); + st->cofunc->KiYield(); return st->wakeupEvent; } diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index 36171a7570..6421734c34 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -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();