Skip to content

Commit

Permalink
use static_cast for type safety in get_total_ram()
Browse files Browse the repository at this point in the history
  • Loading branch information
levkropp committed Jan 14, 2025
1 parent db8d38b commit 64da0bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/platform_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,5 @@ int mp::platform::Platform::get_cpus() const

long long mp::platform::Platform::get_total_ram() const
{
return (long long)sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE);
return static_cast<long long>(sysconf(_SC_PHYS_PAGES)) * sysconf(_SC_PAGESIZE);
}

0 comments on commit 64da0bb

Please sign in to comment.