mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Better names
This commit is contained in:
		| @@ -226,9 +226,9 @@ public: | ||||
| 	template < typename T, typename std::enable_if < std::is_pointer<T>::value, int  >::type = 0 > | ||||
| 	void load(T &data) | ||||
| 	{ | ||||
| 		ui8 hlp; | ||||
| 		load( hlp ); | ||||
| 		if(!hlp) | ||||
| 		bool isNull; | ||||
| 		load( isNull ); | ||||
| 		if(isNull) | ||||
| 		{ | ||||
| 			data = nullptr; | ||||
| 			return; | ||||
|   | ||||
| @@ -174,11 +174,11 @@ public: | ||||
| 	void save(const T &data) | ||||
| 	{ | ||||
| 		//write if pointer is not nullptr | ||||
| 		ui8 hlp = (data!=nullptr); | ||||
| 		save(hlp); | ||||
| 		bool isNull = (data == nullptr); | ||||
| 		save(isNull); | ||||
|  | ||||
| 		//if pointer is nullptr then we don't need anything more... | ||||
| 		if(!hlp) | ||||
| 		if(data == nullptr) | ||||
| 			return; | ||||
|  | ||||
| 		savePointerImpl(data); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user