1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Compile fixes specific for VS 2012"

* Reverted std::bind to boost::bind. std::bind on Visual 2012 doesn't work in some cases (especially with std::ref), not sure why [but it seems to be a bug, since 2013 preview compiles the same code fine]. 
 * Move assignment operator for VS 2012.
This commit is contained in:
Michał W. Urbańczyk
2013-07-02 15:23:32 +00:00
parent 7a8e401860
commit a1f545792b
31 changed files with 319 additions and 294 deletions

View File

@@ -121,12 +121,12 @@ void Graphics::initializeBattleGraphics()
Graphics::Graphics()
{
std::vector<Task> tasks; //preparing list of graphics to load
tasks += std::bind(&Graphics::loadFonts,this);
tasks += std::bind(&Graphics::loadPaletteAndColors,this);
tasks += std::bind(&Graphics::loadHeroFlags,this);
tasks += std::bind(&Graphics::initializeBattleGraphics,this);
tasks += std::bind(&Graphics::loadErmuToPicture,this);
tasks += std::bind(&Graphics::initializeImageLists,this);
tasks += boost::bind(&Graphics::loadFonts,this);
tasks += boost::bind(&Graphics::loadPaletteAndColors,this);
tasks += boost::bind(&Graphics::loadHeroFlags,this);
tasks += boost::bind(&Graphics::initializeBattleGraphics,this);
tasks += boost::bind(&Graphics::loadErmuToPicture,this);
tasks += boost::bind(&Graphics::initializeImageLists,this);
tasks += GET_DEF_ESS(resources32,"RESOURCE.DEF");
tasks += GET_DEF_ESS(spellscr,"SPELLSCR.DEF");
tasks += GET_DEF_ESS(heroMoveArrows,"ADAG.DEF");
@@ -273,7 +273,7 @@ void Graphics::loadHeroFlags()
boost::thread_group grupa;
for(int g=3; g>=0; --g)
{
grupa.create_thread(std::bind(&Graphics::loadHeroFlagsDetail, this, std::ref(pr[g]), true));
grupa.create_thread(boost::bind(&Graphics::loadHeroFlagsDetail, this, boost::ref(pr[g]), true));
}
grupa.join_all();
logGlobal->infoStream() << "Loading and transforming heroes' flags: "<<th.getDiff();