clang format

This commit is contained in:
IndecisiveTurtle 2024-07-15 03:47:10 +03:00
parent dbeed80e3b
commit ce6a01bd41
7 changed files with 14 additions and 18 deletions

View File

@ -27,18 +27,15 @@ public:
explicit MntPoints() = default;
~MntPoints() = default;
void Mount(const std::filesystem::path& host_folder,
const std::string& guest_folder);
void Unmount(const std::filesystem::path& host_folder,
const std::string& guest_folder);
void Mount(const std::filesystem::path& host_folder, const std::string& guest_folder);
void Unmount(const std::filesystem::path& host_folder, const std::string& guest_folder);
void UnmountAll();
std::filesystem::path GetHostPath(const std::string& guest_directory);
const MntPair* GetMount(const std::string& guest_path) {
const auto it = std::ranges::find_if(m_mnt_pairs, [&](const auto& mount) {
return guest_path.starts_with(mount.mount);
});
const auto it = std::ranges::find_if(
m_mnt_pairs, [&](const auto& mount) { return guest_path.starts_with(mount.mount); });
return it == m_mnt_pairs.end() ? nullptr : &*it;
}

View File

@ -20,7 +20,7 @@ public:
EventFlagInternal(const std::string& name, ThreadMode thread_mode, QueueMode queue_mode,
uint64_t bits)
: m_name(name), m_thread_mode(thread_mode), m_queue_mode(queue_mode), m_bits(bits){};
: m_name(name), m_thread_mode(thread_mode), m_queue_mode(queue_mode), m_bits(bits) {};
int Wait(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result, u32* ptr_micros);
int Poll(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result);

View File

@ -134,8 +134,7 @@ s32 PS4_SYSV_ABI sceKernelAddHRTimerEvent(SceKernelEqueue eq, int id, timespec*
event.timer = std::make_unique<boost::asio::steady_timer>(
io_context, std::chrono::microseconds(total_us - HrTimerSpinlockThresholdUs));
event.timer->async_wait(
std::bind(SmallTimerCallback, std::placeholders::_1, eq, event.event));
event.timer->async_wait(std::bind(SmallTimerCallback, std::placeholders::_1, eq, event.event));
if (!eq->AddEvent(event)) {
return ORBIS_KERNEL_ERROR_ENOMEM;

View File

@ -536,7 +536,7 @@ int PS4_SYSV_ABI sceSaveDataSaveIcon(const OrbisSaveDataMountPoint* mountPoint,
const auto mount_dir = mnt->GetHostPath(mountPoint->data);
LOG_INFO(Lib_SaveData, "called = {}", mount_dir.native());
if (icon != nullptr) {
if (icon != nullptr) {
Common::FS::IOFile file(mount_dir / "save_data.png", Common::FS::FileAccessMode::Write);
file.WriteRaw<u8>(icon->buf, icon->bufSize);
}

View File

@ -9,8 +9,8 @@
#ifdef _WIN32
#include <windows.h>
#else
#include <asm/prctl.h> /* Definition of ARCH_* constants */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <asm/prctl.h> /* Definition of ARCH_* constants */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#endif
namespace Core {
@ -93,12 +93,12 @@ static void PatchFsAccess(u8* code, const TLSPattern& tls_pattern, Xbyak::CodeGe
static u32 slot = 0;
void SetTcbBase(void* image_address) {
asm volatile("wrgsbase %0" :: "r" (image_address) : "memory");
asm volatile("wrgsbase %0" ::"r"(image_address) : "memory");
}
Tcb* GetTcbBase() {
Tcb* tcb;
asm volatile("rdgsbase %0" : "=r" (tcb) :: "memory");
asm volatile("rdgsbase %0" : "=r"(tcb)::"memory");
return tcb;
}

View File

@ -12,8 +12,8 @@
namespace Shader::IR {
template <typename Pred>
auto BreadthFirstSearch(const Value& value, Pred&& pred)
-> std::invoke_result_t<Pred, const Inst*> {
auto BreadthFirstSearch(const Value& value,
Pred&& pred) -> std::invoke_result_t<Pred, const Inst*> {
if (value.IsImmediate()) {
// Nothing to do with immediates
return std::nullopt;

View File

@ -52,7 +52,7 @@ constexpr Type F64x2{Type::F64x2};
constexpr Type F64x3{Type::F64x3};
constexpr Type F64x4{Type::F64x4};
constexpr OpcodeMeta META_TABLE[]{
constexpr OpcodeMeta META_TABLE[] {
#define OPCODE(name_token, type_token, ...) \
{ \
.name{#name_token}, \