Add a *ton* of const and constexpr around the codebase. (#1864)

* Add a *ton* of const and constexpr around the codebase.

This makes the codebase compile without strings being cast to non-const char*. I also went through and added constexpr where appropriate for tons of static data.

* Make process definitions const too

Might as well
This commit is contained in:
Pieter-Jan Briers
2026-05-28 07:12:16 +02:00
committed by GitHub
parent db39a9c7f3
commit 5d68762590
954 changed files with 4693 additions and 4682 deletions
+2 -2
View File
@@ -277,7 +277,7 @@ bool dMsgScrn3Select_c::isSelect() {
return mProcess == PROC_SELECT_e ? TRUE : FALSE;
}
void dMsgScrn3Select_c::setString(char* mpText0, char* mpText1, char* mpText2) {
void dMsgScrn3Select_c::setString(DUSK_CONST char* mpText0, DUSK_CONST char* mpText1, DUSK_CONST char* mpText2) {
if (mpTmSel_c[0] != NULL) {
JUT_ASSERT(0, ((J2DTextBox*)(mpTmSel_c[0]->getPanePtr()))->getStringAllocByte() >
strlen(mpText0));
@@ -306,7 +306,7 @@ void dMsgScrn3Select_c::setString(char* mpText0, char* mpText1, char* mpText2) {
}
}
void dMsgScrn3Select_c::setRubyString(char* pText0, char* pText1, char* pText2) {
void dMsgScrn3Select_c::setRubyString(DUSK_CONST char* pText0, DUSK_CONST char* pText1, DUSK_CONST char* pText2) {
if (mpTmrSel_c[0] != NULL) {
JUT_ASSERT(0, ((J2DTextBox*)(mpTmrSel_c[0]->getPanePtr()))->getStringAllocByte() >
strlen(pText0));