Coding style issues fixes

Thanks @Megamouse
This commit is contained in:
DH 2025-03-01 01:02:01 +03:00 committed by Megamouse
parent 976b0a8f1d
commit 95d0cb18e4
10 changed files with 20 additions and 19 deletions

View file

@ -1693,7 +1693,8 @@ fs::file fs::file::from_native_handle(void *handle)
return result;
}
#else
fs::file fs::file::from_native_handle(int fd) {
fs::file fs::file::from_native_handle(int fd)
{
fs::file result;
result.m_file = std::make_unique<unix_file>(fd);
return result;

View file

@ -2697,11 +2697,10 @@ u64 thread_base::get_cycles()
#else
clockid_t _clock;
struct timespec thread_time;
pthread_t thread_id;
#ifdef ANDROID
thread_id = handle;
pthread_t thread_id = handle;
#else
thread_id = reinterpret_cast<pthread_t>(handle);
pthread_t thread_id = reinterpret_cast<pthread_t>(handle);
#endif
if (!pthread_getcpuclockid(thread_id, &_clock) && !clock_gettime(_clock, &thread_time))
{

View file

@ -167,12 +167,13 @@ namespace aarch64
return {};
}
if (lowest_part_info == nullptr || lowest_part_info > part_info) {
if (lowest_part_info == nullptr || lowest_part_info > part_info)
{
lowest_part_info = part_info;
}
}
return lowest_part_info == nullptr ? "" : lowest_part_info->name;
return lowest_part_info ? lowest_part_info->name : "";
}
std::string get_cpu_brand()

View file

@ -3,7 +3,7 @@
#include "Utilities/Thread.h"
#include "util/logs.hpp"
#include "Emu/Memory/vm.h"
#include "pine/pine_server.h"
#include "3rdparty/pine/pine_server.h"
LOG_CHANNEL(IPC);

View file

@ -687,7 +687,7 @@ namespace utils
#ifdef __linux__
#ifdef ANDROID
if constexpr (char c = '?'; true)
if constexpr (constexpr char c = '?')
#else
if (const char c = fs::file("/proc/sys/vm/overcommit_memory").read<char>(); c == '0' || c == '1')
#endif