Skip to content

Commit

Permalink
[Chores] Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble authored Jan 7, 2025
1 parent e6f816d commit 95e88bf
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/core/pcsxlua.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct LuaBreakpoint {
PCSX::Debug::BreakpointUserListType wrapper;
};

uint64_t getCPUCycles() { return PCSX::g_emulator->m_cpu->m_regs.cycle; }
uint64_t getCPUCycles() { return PCSX::g_emulator->m_cpu->m_regs.cycle; }
void* getMemPtr() { return PCSX::g_emulator->m_mem->m_wram; }
void* getParPtr() { return PCSX::g_emulator->m_mem->m_exp1; }
void* getRomPtr() { return PCSX::g_emulator->m_mem->m_bios; }
Expand Down
2 changes: 1 addition & 1 deletion src/core/psxemulator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void PCSX::Emulator::setLua() {
L.pop();
L.pop();
L.pop();

m_pads->setLua(L);

assert(L.gettop() == 0);
Expand Down
10 changes: 5 additions & 5 deletions src/mips/common/crt0/cxxglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ extern fptr __preinit_array_end[] __attribute__((weak));
extern fptr __init_array_start[] __attribute__((weak));
extern fptr __init_array_end[] __attribute__((weak));

int main(int argc, char ** argv);
int main(int argc, char** argv);

void cxxmain(int argc, char ** argv) {
void cxxmain(int argc, char** argv) {
size_t count, i;

count = __preinit_array_end - __preinit_array_start;
Expand All @@ -69,16 +69,16 @@ void cxxmain(int argc, char ** argv) {

// These two technically aren't part of the standard library requirements, but can
// be invoked by the freestanding libstdc++, so might as well.
__attribute__((weak)) size_t strlen(const char * s) {
__attribute__((weak)) size_t strlen(const char* s) {
size_t r = 0;

while (*s++) r++;

return r;
}

__attribute__((weak)) const void * memchr(const void * _s, int c, size_t n) {
const uint8_t * s = (uint8_t *) _s;
__attribute__((weak)) const void* memchr(const void* _s, int c, size_t n) {
const uint8_t* s = (uint8_t*)_s;
size_t i;

for (i = 0; i < n; i++, s++) {
Expand Down
8 changes: 4 additions & 4 deletions src/mips/psyqo/bump-allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ namespace psyqo {
template <size_t N>
class BumpAllocator {
public:
template <Primitive P, typename ...Args>
Fragments::SimpleFragment<P> &allocateFragment(Args ...args) {
template <Primitive P, typename... Args>
Fragments::SimpleFragment<P> &allocateFragment(Args... args) {
static constexpr size_t size = sizeof(Fragments::SimpleFragment<P>);
uint8_t *ptr = m_current;
m_current += size;
return *new (ptr) Fragments::SimpleFragment<P>(args...);
}
template <typename T, typename ...Args>
T &allocate(Args ...args) {
template <typename T, typename... Args>
T &allocate(Args... args) {
size_t size = sizeof(T);
uint8_t *ptr = m_current;
if constexpr (alignof(T) > 1) {
Expand Down
4 changes: 2 additions & 2 deletions src/mips/psyqo/examples/cube/cube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void CubeScene::frame() {

// Read the result of nclip and skip rendering this face if it's not facing us
int32_t mac0 = 0;
psyqo::GTE::read<psyqo::GTE::Register::MAC0>(reinterpret_cast<uint32_t *>(&mac0));
psyqo::GTE::read<psyqo::GTE::Register::MAC0>(reinterpret_cast<uint32_t*>(&mac0));
if (mac0 <= 0) continue;

// Since the GTE can only handle 3 vertices at a time, we need to store our first vertex
Expand All @@ -191,7 +191,7 @@ void CubeScene::frame() {
// Calculate the average Z for the z-Index to be put in the ordering table
psyqo::GTE::Kernels::avsz4();
int32_t zIndex = 0;
psyqo::GTE::read<psyqo::GTE::Register::OTZ>(reinterpret_cast<uint32_t *>(&zIndex));
psyqo::GTE::read<psyqo::GTE::Register::OTZ>(reinterpret_cast<uint32_t*>(&zIndex));

// If the Z-index is out of bounds for our ordering table, we skip rendering this face.
if (zIndex < 0 || zIndex >= ORDERING_TABLE_SIZE) continue;
Expand Down
4 changes: 2 additions & 2 deletions src/mips/psyqo/iso9660-parser.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ SOFTWARE.

#pragma once

#include <coroutine>

#include <EASTL/fixed_string.h>
#include <EASTL/functional.h>
#include <EASTL/string_view.h>

#include <coroutine>

#include "psyqo/cdrom.hh"
#include "psyqo/task.hh"

Expand Down
2 changes: 1 addition & 1 deletion src/mips/psyqo/primitives/common.hh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ enum ColorMode { Tex4Bits, Tex8Bits, Tex16Bits };
} // namespace Prim::TPageAttr

namespace Prim {
enum class Transparency { Auto, Opaque, SemiTransparent };
enum class Transparency { Auto, Opaque, SemiTransparent };
}

namespace PrimPieces {
Expand Down

0 comments on commit 95e88bf

Please sign in to comment.