Skip to content

Commit

Permalink
Merge pull request #1483 from grumpycoders/chores-code-format
Browse files Browse the repository at this point in the history
[Chores] Format code
  • Loading branch information
nicolasnoble authored Dec 13, 2023
2 parents 5419e2d + f8d29c7 commit 2cc5354
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/mips/common/psxlibc/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SOFTWARE.
#include <stdint.h>

static __attribute__((always_inline)) void* safeMemZero(void* ptr_, int size) {
uint8_t* ptr = (uint8_t*) ptr_;
uint8_t* ptr = (uint8_t*)ptr_;
if (!ptr || size <= 0) return NULL;
uint8_t* orig = ptr;
for (; size > 0; ptr++) {
Expand Down
2 changes: 1 addition & 1 deletion src/mips/openbios/cdrom/filesystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ int dev_cd_open(struct File *file, const char *filename, int mode) {
}

int dev_cd_read(struct File *file, void *buffer_, int size) {
char* buffer = (char*) buffer_;
char *buffer = (char *)buffer_;
if ((size & 0x7ff) || (file->offset & 0x7ff) || (size < 0) || (file->offset >= file->length)) {
file->errno = PSXEINVAL;
return -1;
Expand Down
13 changes: 7 additions & 6 deletions src/mips/psyqo/fragment-concept.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ namespace psyqo {
* to ensure that a type is a valid fragment.
*/

template<typename Frag>
template <typename Frag>
concept Fragment = requires(Frag frag) {
{ new int[(alignof(Frag) & 3) == 0 ? 1 : -1] };
{ new int[(sizeof(Frag) & 3) == 0 ? 1 : -1] };
{ new int[(sizeof(frag.head)) == 4 ? 1 : -1] };
{ new int[((offsetof(Frag, head)) & 3) == 0 ? 1 : -1] };
{ frag.getActualFragmentSize() } -> std::convertible_to<size_t>;
{new int[(alignof(Frag) & 3) == 0 ? 1 : -1]};
{new int[(sizeof(Frag) & 3) == 0 ? 1 : -1]};
{new int[(sizeof(frag.head)) == 4 ? 1 : -1]};
{new int[((offsetof(Frag, head)) & 3) == 0 ? 1 : -1]};
{ frag.getActualFragmentSize() }
->std::convertible_to<size_t>;
};

} // namespace psyqo
4 changes: 2 additions & 2 deletions src/mips/psyqo/primitive-concept.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ namespace psyqo {

template <typename Prim>
concept Primitive = requires {
{ new int[(alignof(Prim) & 3) == 0 ? 1 : -1] };
{ new int[(sizeof(Prim) & 3) == 0 ? 1 : -1] };
{new int[(alignof(Prim) & 3) == 0 ? 1 : -1]};
{new int[(sizeof(Prim) & 3) == 0 ? 1 : -1]};
};

} // namespace psyqo

0 comments on commit 2cc5354

Please sign in to comment.