Fixing most clang-format errors.

This commit is contained in:
Ben Vanik
2015-05-03 10:27:50 -07:00
parent 6b22d35bfc
commit d1ee1512b9
39 changed files with 540 additions and 550 deletions

View File

@@ -64,8 +64,7 @@ X_STATUS DiscImageEntry::QueryDirectory(XDirectoryInfo* out_info, size_t length,
if (!entry) {
return X_STATUS_NO_SUCH_FILE;
}
}
else {
} else {
if (restart) {
it_ = gdfx_entry_->children.begin();
}

View File

@@ -18,9 +18,7 @@ namespace fs {
HostPathFile::HostPathFile(KernelState* kernel_state, Mode mode,
HostPathEntry* entry, HANDLE file_handle)
: entry_(entry),
file_handle_(file_handle),
XFile(kernel_state, mode) {}
: entry_(entry), file_handle_(file_handle), XFile(kernel_state, mode) {}
HostPathFile::~HostPathFile() {
CloseHandle(file_handle_);

View File

@@ -39,7 +39,7 @@ int STFSContainerDevice::Init() {
return 1;
}
//stfs_->Dump();
// stfs_->Dump();
return 0;
}

View File

@@ -45,7 +45,7 @@ X_STATUS STFSContainerEntry::QueryDirectory(XDirectoryInfo* out_info,
STFSEntry* entry(nullptr);
if( file_name != nullptr ) {
if (file_name != nullptr) {
// Only queries in the current directory are supported for now
assert_true(std::strchr(file_name, '\\') == nullptr);

View File

@@ -30,9 +30,7 @@ Entry::Entry(Device* device, const std::string& path)
Entry::~Entry() = default;
bool Entry::is_read_only() const {
return device_->is_read_only();
}
bool Entry::is_read_only() const { return device_->is_read_only(); }
} // namespace fs
} // namespace kernel

View File

@@ -39,8 +39,7 @@ class FileSystem {
int RegisterDevice(const std::string& path, Device* device);
int RegisterHostPathDevice(const std::string& path,
const std::wstring& local_path,
bool read_only);
const std::wstring& local_path, bool read_only);
int RegisterDiscImageDevice(const std::string& path,
const std::wstring& local_path);
int RegisterSTFSContainerDevice(const std::string& path,

View File

@@ -213,7 +213,7 @@ X_STATUS ObjectTable::AddNameMapping(const std::string& name, X_HANDLE handle) {
if (name_table_.count(name)) {
return X_STATUS_OBJECT_NAME_COLLISION;
}
name_table_.insert({ name, handle });
name_table_.insert({name, handle});
return X_STATUS_SUCCESS;
}

View File

@@ -16,8 +16,7 @@ XEnumerator::XEnumerator(KernelState* kernel_state, size_t item_capacity,
size_t item_size)
: XObject(kernel_state, kTypeEnumerator),
item_capacity_(item_capacity),
item_size_(item_size)
{}
item_size_(item_size) {}
XEnumerator::~XEnumerator() = default;

View File

@@ -424,8 +424,9 @@ void XThread::DeliverAPCs(void* data) {
// kernel_routine(apc_address, &normal_routine, &normal_context,
// &system_arg1, &system_arg2)
uint64_t kernel_args[] = {
apc_address, thread->scratch_address_ + 0, thread->scratch_address_ + 4,
thread->scratch_address_ + 8, thread->scratch_address_ + 12,
apc_address, thread->scratch_address_ + 0,
thread->scratch_address_ + 4, thread->scratch_address_ + 8,
thread->scratch_address_ + 12,
};
processor->ExecuteInterrupt(0, kernel_routine, kernel_args,
xe::countof(kernel_args));

View File

@@ -40,7 +40,7 @@ void XamModule::RegisterExportTable(xe::cpu::ExportResolver* export_resolver) {
return;
}
// Build the export table used for resolution.
// Build the export table used for resolution.
#include "xenia/kernel/util/export_table_pre.inc"
static xe::cpu::KernelExport xam_export_table[] = {
#include "xenia/kernel/xam_table.inc"

View File

@@ -33,7 +33,8 @@ SHIM_CALL XMsgInProcessCall_shim(PPCContext* ppc_state, KernelState* state) {
SHIM_SET_RETURN_32(result);
}
SHIM_CALL XMsgSystemProcessCall_shim(PPCContext* ppc_state, KernelState* state) {
SHIM_CALL XMsgSystemProcessCall_shim(PPCContext* ppc_state,
KernelState* state) {
uint32_t app = SHIM_GET_ARG_32(0);
uint32_t message = SHIM_GET_ARG_32(1);
uint32_t buffer = SHIM_GET_ARG_32(2);

View File

@@ -283,7 +283,7 @@ SHIM_CALL NetDll_select_shim(PPCContext* ppc_state, KernelState* state) {
uint32_t timeout_ptr = SHIM_GET_ARG_32(5);
XELOGD("NetDll_select(%d, %d, %.8X, %.8X, %.8X, %.8X)", arg0, nfds,
readfds_ptr, writefds_ptr, exceptfds_ptr, timeout_ptr);
fd_set readfds = { 0 };
fd_set readfds = {0};
if (readfds_ptr) {
LoadFdset(SHIM_MEM_ADDR(readfds_ptr), &readfds);
}

View File

@@ -416,7 +416,8 @@ SHIM_CALL XamWriteGamerTile_shim(PPCContext* ppc_state, KernelState* state) {
}
}
SHIM_CALL XamSessionCreateHandle_shim(PPCContext* ppc_state, KernelState* state) {
SHIM_CALL XamSessionCreateHandle_shim(PPCContext* ppc_state,
KernelState* state) {
uint32_t handle_ptr = SHIM_GET_ARG_32(0);
XELOGD("XamSessionCreateHandle(%.8X)", handle_ptr);
@@ -426,7 +427,8 @@ SHIM_CALL XamSessionCreateHandle_shim(PPCContext* ppc_state, KernelState* state)
SHIM_SET_RETURN_32(X_ERROR_SUCCESS);
}
SHIM_CALL XamSessionRefObjByHandle_shim(PPCContext* ppc_state, KernelState* state) {
SHIM_CALL XamSessionRefObjByHandle_shim(PPCContext* ppc_state,
KernelState* state) {
uint32_t handle = SHIM_GET_ARG_32(0);
uint32_t obj_ptr = SHIM_GET_ARG_32(1);

View File

@@ -319,7 +319,7 @@ SHIM_CALL KeDelayExecutionThread_shim(PPCContext* ppc_state,
}
SHIM_CALL NtYieldExecution_shim(PPCContext* ppc_state, KernelState* state) {
//XELOGD("NtYieldExecution()");
// XELOGD("NtYieldExecution()");
XThread* thread = XThread::GetCurrentThread();
X_STATUS result = thread->Delay(0, 0, 0);
SHIM_SET_RETURN_64(0);