Skip to content

Commit 31cbd4e

Browse files
committed
Use correct integer types in cpuinfo
1 parent 1ee6fa6 commit 31cbd4e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/sdl2/cpuinfo.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
pub use sys::cpuinfo as ll;
22

3-
pub const CACHELINESIZE: isize = 128;
3+
pub const CACHELINESIZE: u8 = 128;
44

5-
pub fn get_cpu_count() -> isize {
6-
unsafe { ll::SDL_GetCPUCount() as isize }
5+
pub fn get_cpu_count() -> i32 {
6+
unsafe { ll::SDL_GetCPUCount() }
77
}
88

9-
pub fn get_cpu_cache_line_size() -> isize {
10-
unsafe { ll::SDL_GetCPUCacheLineSize() as isize}
9+
pub fn get_cpu_cache_line_size() -> i32 {
10+
unsafe { ll::SDL_GetCPUCacheLineSize() }
1111
}
1212

1313
pub fn has_rdtsc() -> bool {
@@ -50,6 +50,6 @@ pub fn has_avx() -> bool {
5050
unsafe { ll::SDL_HasAVX() == 1 }
5151
}
5252

53-
pub fn get_system_ram() -> isize {
54-
unsafe { ll::SDL_GetSystemRAM() as isize }
53+
pub fn get_system_ram() -> i32 {
54+
unsafe { ll::SDL_GetSystemRAM() }
5555
}

0 commit comments

Comments
 (0)