mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Apply suggestions from code review
Co-Authored-By: Mat M. <mathew1800@gmail.com>
This commit is contained in:
		
							parent
							
								
									841255cd16
								
							
						
					
					
						commit
						8f059ae398
					
				
					 9 changed files with 23 additions and 22 deletions
				
			
		|  | @ -4,7 +4,7 @@ | |||
| 
 | ||||
| #pragma once | ||||
| 
 | ||||
| #include "boost/archive/binary_iarchive.hpp" | ||||
| #include <boost/archive/binary_iarchive.hpp> | ||||
| #include "boost/archive/binary_oarchive.hpp" | ||||
| #include "boost/serialization/export.hpp" | ||||
| 
 | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ private: | |||
| class BufferMem : public BackingMem { | ||||
| public: | ||||
|     BufferMem() = default; | ||||
|     BufferMem(u32 size) : data(std::vector<u8>(size)) {} | ||||
|     explicit BufferMem(std::size_t size) : data(size) {} | ||||
| 
 | ||||
|     u8* GetPtr() override { | ||||
|         return data.data(); | ||||
|  | @ -77,7 +77,7 @@ public: | |||
|     inline u8* GetPtr() { | ||||
|         return cptr; | ||||
|     } | ||||
|     inline operator bool() const { | ||||
|     explicit operator bool() const { | ||||
|         return cptr != nullptr; | ||||
|     } | ||||
|     inline const u8* GetPtr() const { | ||||
|  |  | |||
|  | @ -19,7 +19,7 @@ void load(Archive& ar, boost::container::flat_set<T>& set, const unsigned int fi | |||
|     u64 count{}; | ||||
|     ar >> count; | ||||
|     set.clear(); | ||||
|     for (auto i = 0; i < count; i++) { | ||||
|     for (u64 i = 0; i < count; i++) { | ||||
|         T value{}; | ||||
|         ar >> value; | ||||
|         set.insert(value); | ||||
|  |  | |||
|  | @ -167,7 +167,7 @@ private: | |||
|         } else if (q == UnlinkedTag()) { | ||||
|             return -1; | ||||
|         } else { | ||||
|             return static_cast<s32>(q - &queues[0]); | ||||
|             return q - queues.data(); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | @ -186,8 +186,8 @@ private: | |||
|     void save(Archive& ar, const unsigned int file_version) const { | ||||
|         s32 idx = ToIndex(first); | ||||
|         ar << idx; | ||||
|         for (auto i = 0; i < NUM_QUEUES; i++) { | ||||
|             s32 idx1 = ToIndex(queues[i].next_nonempty); | ||||
|         for (size_t i = 0; i < NUM_QUEUES; i++) { | ||||
|             const s32 idx1 = ToIndex(queues[i].next_nonempty); | ||||
|             ar << idx1; | ||||
|             ar << queues[i].data; | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue