mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	kernel/shared_page: Silence missing return warning in GetInitTime()
We can use UNREACHABLE_MSG to indicate that this path isn't intended to be reached, as it would indicate a wrong enum value.
This commit is contained in:
		
							parent
							
								
									397bd1bb73
								
							
						
					
					
						commit
						f7ad004fb0
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -5,6 +5,7 @@ | |||
| #include <chrono> | ||||
| #include <cstring> | ||||
| #include "common/archives.h" | ||||
| #include "common/assert.h" | ||||
| #include "core/core.h" | ||||
| #include "core/core_timing.h" | ||||
| #include "core/hle/kernel/shared_page.h" | ||||
|  | @ -30,8 +31,8 @@ template void load_construct_data<iarchive>(iarchive& ar, SharedPage::Handler* t | |||
| namespace SharedPage { | ||||
| 
 | ||||
| static std::chrono::seconds GetInitTime() { | ||||
|     u64 override_init_time = Core::Movie::GetInstance().GetOverrideInitTime(); | ||||
|     if (override_init_time) { | ||||
|     const u64 override_init_time = Core::Movie::GetInstance().GetOverrideInitTime(); | ||||
|     if (override_init_time != 0) { | ||||
|         // Override the clock init time with the one in the movie
 | ||||
|         return std::chrono::seconds(override_init_time); | ||||
|     } | ||||
|  | @ -48,6 +49,9 @@ static std::chrono::seconds GetInitTime() { | |||
|     } | ||||
|     case Settings::InitClock::FixedTime: | ||||
|         return std::chrono::seconds(Settings::values.init_time); | ||||
|     default: | ||||
|         UNREACHABLE_MSG("Invalid InitClock value ({})", | ||||
|                         static_cast<u32>(Settings::values.init_clock)); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue