Fix build error with MacOS

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2021-11-04 12:49:00 +01:00
parent 58cecdf771
commit cee213bb95

View File

@ -154,7 +154,7 @@ double ThreadCPUUsage() {
mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
thread_basic_info_data_t info;
mach_port_t thread = pthread_mach_thread_np(pthread_self());
if (thread_info(thread, THREAD_BASIC_INFO, (thread_info_t)&info, &count) ==
if (thread_info(thread, THREAD_BASIC_INFO, static_cast<thread_info_t>(&info), &count) ==
KERN_SUCCESS) {
return MakeTime(info);
}