mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fixed CID 1197516
This commit is contained in:
		| @@ -87,7 +87,7 @@ CPlayerInterface * LOCPLINT; | ||||
| CBattleInterface * CPlayerInterface::battleInt; | ||||
|  | ||||
| enum  EMoveState {STOP_MOVE, WAITING_MOVE, CONTINUE_MOVE, DURING_MOVE}; | ||||
| CondSh<EMoveState> stillMoveHero; //used during hero movement | ||||
| CondSh<EMoveState> stillMoveHero(STOP_MOVE); //used during hero movement | ||||
|  | ||||
| int CPlayerInterface::howManyPeople = 0; | ||||
|  | ||||
|   | ||||
| @@ -46,7 +46,7 @@ | ||||
|  * | ||||
|  */ | ||||
|  | ||||
| CondSh<bool> CBattleInterface::animsAreDisplayed; | ||||
| CondSh<bool> CBattleInterface::animsAreDisplayed(false); | ||||
|  | ||||
| static void onAnimationFinished(const CStack *stack, CCreatureAnimation *anim) | ||||
| { | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
| extern std::queue<SDL_Event> events; | ||||
| extern boost::mutex eventsM; | ||||
|  | ||||
| CondSh<bool> CGuiHandler::terminate_cond; | ||||
| CondSh<bool> CGuiHandler::terminate_cond(false); | ||||
| boost::thread_specific_ptr<bool> inGuiThread; | ||||
|  | ||||
| SObjectConstruction::SObjectConstruction(CIntObject *obj) | ||||
|   | ||||
| @@ -17,15 +17,14 @@ template <typename T> struct CondSh | ||||
| 	boost::condition_variable cond; | ||||
| 	boost::mutex mx; | ||||
|  | ||||
| 	CondSh() {} | ||||
| 	CondSh(T t) : data(t) {} | ||||
|  | ||||
| 	// set data | ||||
| 	void set(T t) | ||||
| 	{ | ||||
| 		boost::unique_lock<boost::mutex> lock(mx);  | ||||
| 		boost::unique_lock<boost::mutex> lock(mx); | ||||
| 		data = t; | ||||
| 	}  | ||||
| 	} | ||||
|  | ||||
| 	// set data and notify | ||||
| 	void setn(T t) | ||||
| @@ -37,7 +36,7 @@ template <typename T> struct CondSh | ||||
| 	// get stored value | ||||
| 	T get() | ||||
| 	{ | ||||
| 		boost::unique_lock<boost::mutex> lock(mx);  | ||||
| 		boost::unique_lock<boost::mutex> lock(mx); | ||||
| 		return data; | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -75,7 +75,7 @@ private: | ||||
| 	mutable CGameHandler * gh; | ||||
| }; | ||||
|  | ||||
| CondSh<bool> battleMadeAction; | ||||
| CondSh<bool> battleMadeAction(false); | ||||
| CondSh<BattleResult *> battleResult(nullptr); | ||||
| template <typename T> class CApplyOnGH; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user