mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-19 19:15:26 +00:00
Coding style issues fixes
Thanks @Megamouse
This commit is contained in:
parent
976b0a8f1d
commit
95d0cb18e4
10 changed files with 20 additions and 19 deletions
|
@ -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;
|
||||
|
|
|
@ -2172,8 +2172,8 @@ void thread_base::start()
|
|||
void thread_base::initialize(void (*error_cb)())
|
||||
{
|
||||
#ifndef _WIN32
|
||||
#ifdef ANDROID
|
||||
m_thread.release(pthread_self());
|
||||
#ifdef ANDROID
|
||||
m_thread.release(pthread_self());
|
||||
#else
|
||||
m_thread.release(reinterpret_cast<u64>(pthread_self()));
|
||||
#endif
|
||||
|
@ -2622,7 +2622,7 @@ thread_base::~thread_base() noexcept
|
|||
WaitForSingleObject(handle0, INFINITE);
|
||||
CloseHandle(handle0);
|
||||
#elif defined(ANDROID)
|
||||
pthread_join(m_thread.load(), nullptr);
|
||||
pthread_join(m_thread.load(), nullptr);
|
||||
#else
|
||||
pthread_join(reinterpret_cast<pthread_t>(m_thread.load()), nullptr);
|
||||
#endif
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -3326,7 +3325,7 @@ u64 thread_ctrl::get_tid()
|
|||
#ifdef _WIN32
|
||||
return GetCurrentThreadId();
|
||||
#elif defined(ANDROID)
|
||||
return static_cast<u64>(pthread_self());
|
||||
return static_cast<u64>(pthread_self());
|
||||
#elif defined(__linux__)
|
||||
return syscall(SYS_gettid);
|
||||
#else
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace aarch64
|
|||
return {};
|
||||
}
|
||||
|
||||
const cpu_entry_t *lowest_part_info = nullptr;
|
||||
const cpu_entry_t* lowest_part_info = nullptr;
|
||||
for (const auto& [midr, count] : core_layout)
|
||||
{
|
||||
const auto implementer_id = (midr >> 24) & 0xff;
|
||||
|
@ -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()
|
||||
|
|
|
@ -133,7 +133,7 @@ sys_net_sockaddr native_addr_to_sys_net_addr(const ::sockaddr_storage& native_ad
|
|||
sys_net_sockaddr sn_addr;
|
||||
|
||||
sys_net_sockaddr_in* paddr = reinterpret_cast<sys_net_sockaddr_in*>(&sn_addr);
|
||||
*paddr = {};
|
||||
*paddr = {};
|
||||
|
||||
paddr->sin_len = sizeof(sys_net_sockaddr_in);
|
||||
paddr->sin_family = SYS_NET_AF_INET;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#include "Utilities/File.h"
|
||||
|
||||
#ifndef WITHOUT_OPENGL
|
||||
#include "Emu/RSX/GL/GLVertexProgram.h"
|
||||
#include "Emu/RSX/GL/GLFragmentProgram.h"
|
||||
#include "Emu/RSX/GL/GLVertexProgram.h"
|
||||
#include "Emu/RSX/GL/GLFragmentProgram.h"
|
||||
#endif
|
||||
|
||||
using CGprofile = u32;
|
||||
|
|
|
@ -121,7 +121,7 @@ struct cfg_root : cfg::node
|
|||
|
||||
cfg::_enum<video_renderer> renderer{ this, "Renderer",
|
||||
#if defined(ANDROID) || defined(__APPLE__)
|
||||
video_renderer::vulkan
|
||||
video_renderer::vulkan
|
||||
#else
|
||||
video_renderer::opengl // TODO: Is it still actual?
|
||||
#endif
|
||||
|
|
|
@ -180,7 +180,7 @@ void pad_thread::Init()
|
|||
keyptr->SetTargetWindow(static_cast<QWindow*>(m_curwindow));
|
||||
cur_pad_handler = keyptr;
|
||||
#else
|
||||
cur_pad_handler = nullpad;
|
||||
cur_pad_handler = nullpad;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
|
|
@ -173,7 +173,7 @@ namespace
|
|||
#ifdef _WIN32
|
||||
tid = GetCurrentThreadId();
|
||||
#elif defined(ANDROID)
|
||||
tid = pthread_self();
|
||||
tid = pthread_self();
|
||||
#else
|
||||
tid = reinterpret_cast<u64>(pthread_self());
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue