mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Serialize kernel/hle/memory
This commit is contained in:
		
							parent
							
								
									050c3bdee5
								
							
						
					
					
						commit
						8c81500dee
					
				
					 4 changed files with 40 additions and 4 deletions
				
			
		
							
								
								
									
										33
									
								
								src/common/serialization/boost_discrete_interval.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								src/common/serialization/boost_discrete_interval.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include "common/common_types.h" | ||||
| #include <boost/icl/discrete_interval.hpp> | ||||
| 
 | ||||
| namespace boost::serialization { | ||||
| 
 | ||||
| template <class Archive, class DomainT, ICL_COMPARE Compare> | ||||
| void save(Archive& ar, const boost::icl::discrete_interval<DomainT, Compare>& obj, const unsigned int file_version) | ||||
| { | ||||
|     ar << obj.lower(); | ||||
|     ar << obj.upper(); | ||||
|     ar << obj.bounds()._bits; | ||||
| } | ||||
| 
 | ||||
| template <class Archive, class DomainT, ICL_COMPARE Compare> | ||||
| void load(Archive& ar, boost::icl::discrete_interval<DomainT, Compare>& obj, const unsigned int file_version) | ||||
| { | ||||
|     DomainT upper, lower; | ||||
|     boost::icl::bound_type bounds; | ||||
|     ar >> upper; | ||||
|     ar >> lower; | ||||
|     ar >> bounds; | ||||
|     obj = boost::icl::discrete_interval(upper, lower, boost::icl::interval_bounds(bounds)); | ||||
| } | ||||
| 
 | ||||
| template <class Archive, class DomainT, ICL_COMPARE Compare> | ||||
| void serialize(Archive& ar, boost::icl::discrete_interval<DomainT, Compare>& obj, const unsigned int file_version) | ||||
| { | ||||
|     boost::serialization::split_free(ar, obj, file_version); | ||||
| } | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue