Use boost::thread instead of std::thread

This commit is contained in:
2015-06-20 12:54:27 -04:00
parent 3239d8e503
commit 8d793a16c4
2 changed files with 7 additions and 7 deletions

View File

@@ -3,7 +3,7 @@
#include "boe.global.hpp"
#include "universe.hpp"
#include <thread>
#include <boost/thread.hpp>
#include "boe.graphics.hpp"
#include "boe.newgraph.hpp"
#include "boe.fileio.hpp"
@@ -332,19 +332,19 @@ void Mouse_Pressed() {
location mousePos(event.mouseButton.x, event.mouseButton.y);
volatile bool doneScrolling = false;
if(mousePos.in(text_sbar->getBounds())) {
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_TRANS));
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_TRANS));
text_sbar->handleClick(mousePos);
doneScrolling = true;
updater.join();
redraw_screen(REFRESH_TRANS);
} else if(mousePos.in(item_sbar->getBounds())) {
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_INVEN));
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_INVEN));
item_sbar->handleClick(mousePos);
doneScrolling = true;
updater.join();
redraw_screen(REFRESH_INVEN);
} else if(overall_mode == MODE_SHOPPING && mousePos.in(shop_sbar->getBounds())) {
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_DLOG));
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling), REFRESH_DLOG));
shop_sbar->handleClick(mousePos);
doneScrolling = true;
updater.join();

View File

@@ -1,6 +1,6 @@
#include <cstdio>
#include <thread>
#include <boost/thread.hpp>
#include "scen.global.hpp"
#include "scenario.hpp"
@@ -531,13 +531,13 @@ void Mouse_Pressed() {
location mousePos(event.mouseButton.x, event.mouseButton.y);
volatile bool doneScrolling = false;
if(right_sbar->isVisible() && mousePos.in(right_sbar->getBounds())) {
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling)));
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling)));
right_sbar->handleClick(mousePos);
doneScrolling = true;
updater.join();
redraw_screen(/*REFRESH_RIGHT_BAR*/);
} else if(pal_sbar->isVisible() && mousePos.in(pal_sbar->getBounds())) {
std::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling)));
boost::thread updater(std::bind(handleUpdateWhileScrolling, std::ref(doneScrolling)));
pal_sbar->handleClick(mousePos);
doneScrolling = true;
updater.join();