mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Patch from O01eg fixing #1308 http://forum.vcmi.eu/viewtopic.php?t=721
Helper functions for enabling/disabling smart vector memeber serialziation. [doesn't really save writing but adds consistency]
This commit is contained in:
		| @@ -263,8 +263,7 @@ void CConnection::prepareForSendingHeroes() | ||||
| { | ||||
| 	loadedPointers.clear(); | ||||
| 	savedPointers.clear(); | ||||
| 	CISer<CConnection>::smartVectorMembersSerialization = false; | ||||
| 	COSer<CConnection>::smartVectorMembersSerialization = false; | ||||
| 	disableSmartVectorMemberSerialization(); | ||||
| 	enableSmartPointerSerializatoin(); | ||||
| } | ||||
|  | ||||
| @@ -272,11 +271,20 @@ void CConnection::enterPregameConnectionMode() | ||||
| { | ||||
| 	loadedPointers.clear(); | ||||
| 	savedPointers.clear(); | ||||
| 	CISer<CConnection>::smartVectorMembersSerialization = false; | ||||
| 	COSer<CConnection>::smartVectorMembersSerialization = false; | ||||
| 	disableSmartVectorMemberSerialization(); | ||||
| 	disableSmartPointerSerialization(); | ||||
| } | ||||
|  | ||||
| void CConnection::disableSmartVectorMemberSerialization() | ||||
| { | ||||
| 	smartVectorMembersSerialization = false; | ||||
| } | ||||
|  | ||||
| void CConnection::enableSmartVectorMemberSerializatoin() | ||||
| { | ||||
| 	smartVectorMembersSerialization = true; | ||||
| } | ||||
|  | ||||
| CSaveFile::CSaveFile( const std::string &fname ) | ||||
| { | ||||
| 	registerTypes(*this); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user