Fix more clangd errors
Some checks failed
Build / build (GZLE01) (push) Has been cancelled
Build / build (GZLJ01) (push) Has been cancelled
Build / build (GZLP01) (push) Has been cancelled
Build / website (push) Has been cancelled

This also seems to fix the problem where clangd failed to index most header files, which was due to the typo in JGeometry.h.
This commit is contained in:
LagoLunatic 2024-11-22 19:04:56 -05:00
parent 12c83739e9
commit c46adebdb9
8 changed files with 13 additions and 6 deletions

View File

@ -33,5 +33,6 @@
},
"clangd.arguments": [
"--function-arg-placeholders=0",
// "--log=verbose",
],
}

View File

@ -320,7 +320,7 @@ struct TVec2 {
template <class T>
struct TBox {
TBox() : i(), f() {}
TBox(const TBox& other) : i(other.f), f(other.y) {}
TBox(const TBox& other) : i(other.i), f(other.f) {}
T i, f;
};

View File

@ -30,7 +30,7 @@ OSTime OSGetTime(void);
OSTick OSGetTick(void);
OSTime __OSGetSystemTime(void);
OSTime __OSTimeToSystemTime(OSTime time);
void GetDates(s32 days, OSCalendarTime* ct);
static void GetDates(s32 days, OSCalendarTime* ct);
void OSTicksToCalendarTime(OSTime ticks, OSCalendarTime* ct);
extern u32 __OSBusClock AT_ADDRESS(0x800000F8);

View File

@ -25,7 +25,7 @@ JKRThread::JKRThread(u32 stack_size, int message_count, int param_3) : mThreadLi
mThreadRecord = (OSThread*)JKRAllocFromHeap(mHeap, sizeof(OSThread), 0x20);
void* stackBase = (void*)((int)mStackMemory + mStackSize);
OSCreateThread(mThreadRecord, start, this, stackBase, mStackSize, param_3, 1);
OSCreateThread(mThreadRecord, (void*)start, this, stackBase, mStackSize, param_3, 1);
mMessageCount = message_count;
mMessages = (OSMessage*)JKRAllocFromHeap(mHeap, mMessageCount * sizeof(OSMessage), 0);
@ -135,4 +135,4 @@ void JKRThreadSwitch::callback(OSThread* current, OSThread* next) {
static void dummy() {
OSReport("Cannot create JKRTask Manager.");
OSReport("sManager != 0");
}
}

View File

@ -55,6 +55,7 @@ inline BOOL __OSCallResetFunctions(u32 arg0) {
return 1;
}
#ifdef __MWERKS__
static asm void Reset(register s32 param_0) {
// clang-format off
nofralloc
@ -107,6 +108,7 @@ lbl_8033F7F8:
b lbl_8033F790
// clang-format on
}
#endif
inline static void KillThreads(void) {
OSThread* thread;

View File

@ -5,6 +5,7 @@
#define OS_TIME_WEEK_DAY_MAX 7
#define OS_TIME_YEAR_DAY_MAX 365
#ifdef __MWERKS__
asm OSTime OSGetTime(void) {
// clang-format off
nofralloc
@ -19,7 +20,9 @@ asm OSTime OSGetTime(void) {
blr
// clang-format on
}
#endif
#ifdef __MWERKS__
asm OSTick OSGetTick(void) {
// clang-format off
nofralloc
@ -28,6 +31,7 @@ asm OSTick OSGetTick(void) {
blr
// clang-format on
}
#endif
#define OS_SYSTEMTIME_BASE 0x30D8

View File

@ -34,7 +34,7 @@ s32 fpcDt_deleteMethod(base_process_class* i_proc) {
/* 8003D314-8003D34C .text fpcDt_Handler__Fv */
void fpcDt_Handler(void) {
cLsIt_Method(&g_fpcDtTg_Queue, (cNdIt_MethodFunc)fpcDtTg_Do, fpcDt_deleteMethod);
cLsIt_Method(&g_fpcDtTg_Queue, (cNdIt_MethodFunc)fpcDtTg_Do, (void*)fpcDt_deleteMethod);
}
/* 8003D34C-8003D3C8 .text fpcDt_ToQueue__FP18base_process_class */

View File

@ -26,7 +26,7 @@ void mDoDvdErr_ThdInit() {
OSThread* curThread = OSGetCurrentThread();
s32 priority = OSGetThreadPriority(curThread);
OSCreateThread(&DvdErr_thread, mDoDvdErr_Watch, NULL, DvdErr_stack + sizeof(DvdErr_stack),
OSCreateThread(&DvdErr_thread, (void*)mDoDvdErr_Watch, NULL, DvdErr_stack + sizeof(DvdErr_stack),
sizeof(DvdErr_stack), priority - 3, 1);
OSResumeThread(&DvdErr_thread);
OSCreateAlarm(&Alarm);