Skip to content

Commit 95d0cb1

Browse files
DHrpcs3Megamouse
authored andcommitted
Coding style issues fixes
Thanks @Megamouse
1 parent 976b0a8 commit 95d0cb1

File tree

10 files changed

+20
-19
lines changed

10 files changed

+20
-19
lines changed

Utilities/File.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,8 @@ fs::file fs::file::from_native_handle(void *handle)
16931693
return result;
16941694
}
16951695
#else
1696-
fs::file fs::file::from_native_handle(int fd) {
1696+
fs::file fs::file::from_native_handle(int fd)
1697+
{
16971698
fs::file result;
16981699
result.m_file = std::make_unique<unix_file>(fd);
16991700
return result;

Utilities/Thread.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,8 +2172,8 @@ void thread_base::start()
21722172
void thread_base::initialize(void (*error_cb)())
21732173
{
21742174
#ifndef _WIN32
2175-
#ifdef ANDROID
2176-
m_thread.release(pthread_self());
2175+
#ifdef ANDROID
2176+
m_thread.release(pthread_self());
21772177
#else
21782178
m_thread.release(reinterpret_cast<u64>(pthread_self()));
21792179
#endif
@@ -2622,7 +2622,7 @@ thread_base::~thread_base() noexcept
26222622
WaitForSingleObject(handle0, INFINITE);
26232623
CloseHandle(handle0);
26242624
#elif defined(ANDROID)
2625-
pthread_join(m_thread.load(), nullptr);
2625+
pthread_join(m_thread.load(), nullptr);
26262626
#else
26272627
pthread_join(reinterpret_cast<pthread_t>(m_thread.load()), nullptr);
26282628
#endif
@@ -2697,11 +2697,10 @@ u64 thread_base::get_cycles()
26972697
#else
26982698
clockid_t _clock;
26992699
struct timespec thread_time;
2700-
pthread_t thread_id;
27012700
#ifdef ANDROID
2702-
thread_id = handle;
2701+
pthread_t thread_id = handle;
27032702
#else
2704-
thread_id = reinterpret_cast<pthread_t>(handle);
2703+
pthread_t thread_id = reinterpret_cast<pthread_t>(handle);
27052704
#endif
27062705
if (!pthread_getcpuclockid(thread_id, &_clock) && !clock_gettime(_clock, &thread_time))
27072706
{
@@ -3326,7 +3325,7 @@ u64 thread_ctrl::get_tid()
33263325
#ifdef _WIN32
33273326
return GetCurrentThreadId();
33283327
#elif defined(ANDROID)
3329-
return static_cast<u64>(pthread_self());
3328+
return static_cast<u64>(pthread_self());
33303329
#elif defined(__linux__)
33313330
return syscall(SYS_gettid);
33323331
#else

rpcs3/Emu/CPU/Backends/AArch64/AArch64Common.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ namespace aarch64
155155
return {};
156156
}
157157

158-
const cpu_entry_t *lowest_part_info = nullptr;
158+
const cpu_entry_t* lowest_part_info = nullptr;
159159
for (const auto& [midr, count] : core_layout)
160160
{
161161
const auto implementer_id = (midr >> 24) & 0xff;
@@ -167,12 +167,13 @@ namespace aarch64
167167
return {};
168168
}
169169

170-
if (lowest_part_info == nullptr || lowest_part_info > part_info) {
170+
if (lowest_part_info == nullptr || lowest_part_info > part_info)
171+
{
171172
lowest_part_info = part_info;
172173
}
173174
}
174175

175-
return lowest_part_info == nullptr ? "" : lowest_part_info->name;
176+
return lowest_part_info ? lowest_part_info->name : "";
176177
}
177178

178179
std::string get_cpu_brand()

rpcs3/Emu/Cell/lv2/sys_net/sys_net_helpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ sys_net_sockaddr native_addr_to_sys_net_addr(const ::sockaddr_storage& native_ad
133133
sys_net_sockaddr sn_addr;
134134

135135
sys_net_sockaddr_in* paddr = reinterpret_cast<sys_net_sockaddr_in*>(&sn_addr);
136-
*paddr = {};
136+
*paddr = {};
137137

138138
paddr->sin_len = sizeof(sys_net_sockaddr_in);
139139
paddr->sin_family = SYS_NET_AF_INET;

rpcs3/Emu/IPC_socket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "Utilities/Thread.h"
44
#include "util/logs.hpp"
55
#include "Emu/Memory/vm.h"
6-
#include "pine/pine_server.h"
6+
#include "3rdparty/pine/pine_server.h"
77

88
LOG_CHANNEL(IPC);
99

rpcs3/Emu/RSX/Program/CgBinaryProgram.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include "Utilities/File.h"
99

1010
#ifndef WITHOUT_OPENGL
11-
#include "Emu/RSX/GL/GLVertexProgram.h"
12-
#include "Emu/RSX/GL/GLFragmentProgram.h"
11+
#include "Emu/RSX/GL/GLVertexProgram.h"
12+
#include "Emu/RSX/GL/GLFragmentProgram.h"
1313
#endif
1414

1515
using CGprofile = u32;

rpcs3/Emu/system_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct cfg_root : cfg::node
121121

122122
cfg::_enum<video_renderer> renderer{ this, "Renderer",
123123
#if defined(ANDROID) || defined(__APPLE__)
124-
video_renderer::vulkan
124+
video_renderer::vulkan
125125
#else
126126
video_renderer::opengl // TODO: Is it still actual?
127127
#endif

rpcs3/Input/pad_thread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void pad_thread::Init()
180180
keyptr->SetTargetWindow(static_cast<QWindow*>(m_curwindow));
181181
cur_pad_handler = keyptr;
182182
#else
183-
cur_pad_handler = nullpad;
183+
cur_pad_handler = nullpad;
184184
#endif
185185
}
186186
else

rpcs3/util/atomic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ namespace
173173
#ifdef _WIN32
174174
tid = GetCurrentThreadId();
175175
#elif defined(ANDROID)
176-
tid = pthread_self();
176+
tid = pthread_self();
177177
#else
178178
tid = reinterpret_cast<u64>(pthread_self());
179179
#endif

rpcs3/util/vm_native.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ namespace utils
687687

688688
#ifdef __linux__
689689
#ifdef ANDROID
690-
if constexpr (char c = '?'; true)
690+
if constexpr (constexpr char c = '?')
691691
#else
692692
if (const char c = fs::file("/proc/sys/vm/overcommit_memory").read<char>(); c == '0' || c == '1')
693693
#endif

0 commit comments

Comments
 (0)