From 392acc0b430d55058f676b7cfbba869be2b82a7c Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Wed, 6 Mar 2013 15:40:47 -0300 Subject: [PATCH] Try to fix compilation for gcc 4.6 [2] --- src/framework/core/asyncdispatcher.h | 4 ++-- src/framework/luafunctions.cpp | 2 +- src/framework/sound/soundmanager.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/framework/core/asyncdispatcher.h b/src/framework/core/asyncdispatcher.h index e914cc61..4ebd09eb 100644 --- a/src/framework/core/asyncdispatcher.h +++ b/src/framework/core/asyncdispatcher.h @@ -35,12 +35,12 @@ public: void stop(); template - boost::unique_future::type> schedule(const F& task) { + boost::shared_future::type> schedule(const F& task) { std::lock_guard lock(m_mutex); auto prom = std::make_shared::type>>(); m_tasks.push_back([=]() { prom->set_value(task()); }); m_condition.notify_all(); - return prom->get_future(); + return prom->get_future().share(); } protected: diff --git a/src/framework/luafunctions.cpp b/src/framework/luafunctions.cpp index 0076649e..f7505d77 100644 --- a/src/framework/luafunctions.cpp +++ b/src/framework/luafunctions.cpp @@ -322,7 +322,7 @@ void Application::registerLuaFunctions() g_lua.bindSingletonFunction("g_ui", "getDraggingWidget", &UIManager::getDraggingWidget, &g_ui); g_lua.bindSingletonFunction("g_ui", "getPressedWidget", &UIManager::getPressedWidget, &g_ui); g_lua.bindSingletonFunction("g_ui", "setDebugBoxesDrawing", &UIManager::setDebugBoxesDrawing, &g_ui); - g_lua.bindSingletonFunction("g_ui", "isDrawingDebugBoxes", &UIManager::setDebugBoxesDrawing, &g_ui); + g_lua.bindSingletonFunction("g_ui", "isDrawingDebugBoxes", &UIManager::isDrawingDebugBoxes, &g_ui); g_lua.bindSingletonFunction("g_ui", "isMouseGrabbed", &UIManager::isMouseGrabbed, &g_ui); g_lua.bindSingletonFunction("g_ui", "isKeyboardGrabbed", &UIManager::isKeyboardGrabbed, &g_ui); diff --git a/src/framework/sound/soundmanager.h b/src/framework/sound/soundmanager.h index f5de89dc..58376f10 100644 --- a/src/framework/sound/soundmanager.h +++ b/src/framework/sound/soundmanager.h @@ -57,7 +57,7 @@ private: ALCdevice *m_device; ALCcontext *m_context; - std::map> m_streamFiles; + std::map> m_streamFiles; std::unordered_map m_buffers; std::vector m_sources; stdext::boolean m_audioEnabled;