mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Merge pull request #4897 from zhaowenlan1779/warning-core-timing
core_timing: Silence sign comparison warnings
This commit is contained in:
		
						commit
						42d3d563b9
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -56,11 +56,11 @@ inline s64 usToCycles(int us) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| inline s64 usToCycles(s64 us) { | inline s64 usToCycles(s64 us) { | ||||||
|     if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { |     if (us / 1000000 > static_cast<s64>(MAX_VALUE_TO_MULTIPLY)) { | ||||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||||
|         return std::numeric_limits<s64>::max(); |         return std::numeric_limits<s64>::max(); | ||||||
|     } |     } | ||||||
|     if (us > MAX_VALUE_TO_MULTIPLY) { |     if (us > static_cast<s64>(MAX_VALUE_TO_MULTIPLY)) { | ||||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||||
|         return BASE_CLOCK_RATE_ARM11 * (us / 1000000); |         return BASE_CLOCK_RATE_ARM11 * (us / 1000000); | ||||||
|     } |     } | ||||||
|  | @ -88,11 +88,11 @@ inline s64 nsToCycles(int ns) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| inline s64 nsToCycles(s64 ns) { | inline s64 nsToCycles(s64 ns) { | ||||||
|     if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { |     if (ns / 1000000000 > static_cast<s64>(MAX_VALUE_TO_MULTIPLY)) { | ||||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||||
|         return std::numeric_limits<s64>::max(); |         return std::numeric_limits<s64>::max(); | ||||||
|     } |     } | ||||||
|     if (ns > MAX_VALUE_TO_MULTIPLY) { |     if (ns > static_cast<s64>(MAX_VALUE_TO_MULTIPLY)) { | ||||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||||
|         return BASE_CLOCK_RATE_ARM11 * (ns / 1000000000); |         return BASE_CLOCK_RATE_ARM11 * (ns / 1000000000); | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue