Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -Wwrite-strings warnings #1267

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/include/act2brick.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Act2Brick : public LegoPathActor {
void Mute(MxBool p_muted);

private:
static LegoChar* g_lodNames[];
static const LegoChar* g_lodNames[];
static MxLong g_lastHitActorTime;

LegoCacheSound* m_whistleSound; // 0x154
Expand Down
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/include/legoanimationmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class LegoAnimationManager : public MxCore {
MxBool FindVehicle(const char* p_name, MxU32& p_index);
MxResult ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info);
MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info);
void FUN_10060480(LegoChar* p_characterNames[], MxU32 p_numCharacterNames);
void FUN_10060480(const LegoChar* p_characterNames[], MxU32 p_numCharacterNames);
void FUN_100604d0(MxBool p_unk0x08);
void FUN_100604f0(MxS32 p_objectIds[], MxU32 p_numObjectIds);
void FUN_10060540(MxBool p_unk0x29);
Expand Down
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ void LegoAnimationManager::DeleteAnimations()

// FUNCTION: LEGO1 0x10060480
// FUNCTION: BETA10 0x100412a9
void LegoAnimationManager::FUN_10060480(LegoChar* p_characterNames[], MxU32 p_numCharacterNames)
void LegoAnimationManager::FUN_10060480(const LegoChar* p_characterNames[], MxU32 p_numCharacterNames)
{
for (MxS32 i = 0; i < p_numCharacterNames; i++) {
for (MxS32 j = 0; j < sizeOfArray(g_characters); j++) {
Expand Down
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/src/entity/act2brick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
DECOMP_SIZE_ASSERT(Act2Brick, 0x194)

// GLOBAL: LEGO1 0x100f7a38
LegoChar* Act2Brick::g_lodNames[] =
const LegoChar* Act2Brick::g_lodNames[] =
{"xchbase1", "xchblad1", "xchseat1", "xchtail1", "xhback1", "xhljet1", "xhmidl1", "xhmotr1", "xhsidl1", "xhsidr1"};

// GLOBAL: LEGO1 0x100f7a60
Expand Down
4 changes: 2 additions & 2 deletions LEGO1/lego/legoomni/src/race/carrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ MxS32 CarRace::g_unk0x100d5d60[] =

// GLOBAL: LEGO1 0x100f0c70
// STRING: LEGO1 0x100f0c48
LegoChar* g_strCRCFRNTY6 = "C_RCFRNTY6";
const LegoChar* g_strCRCFRNTY6 = "C_RCFRNTY6";

// GLOBAL: LEGO1 0x100f0c74
// STRING: LEGO1 0x100f0c3c
LegoChar* g_strCRCEDGEY0 = "C_RCEDGEY0";
const LegoChar* g_strCRCEDGEY0 = "C_RCEDGEY0";

// GLOBAL: LEGO1 0x100f0c7c
MxS32 g_unk0x100f0c7c = 2;
Expand Down
4 changes: 2 additions & 2 deletions LEGO1/lego/legoomni/src/worlds/legoact2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ MxS32 g_unk0x100f43f0[] = {
};

// GLOBAL: LEGO1 0x100f4410
LegoChar* g_unk0x100f4410[] = {"bd", "pg", "rd", "sy", "ro", "cl"};
const LegoChar* g_unk0x100f4410[] = {"bd", "pg", "rd", "sy", "ro", "cl"};

// GLOBAL: LEGO1 0x100f4428
MxS32 g_unk0x100f4428[] = {
Expand All @@ -68,7 +68,7 @@ MxS32 g_unk0x100f4428[] = {
};

// GLOBAL: LEGO1 0x100f4458
LegoChar* g_unk0x100f4458[] = {"papa", "nick", "laura", "cl", "pg", "rd", "sy"};
const LegoChar* g_unk0x100f4458[] = {"papa", "nick", "laura", "cl", "pg", "rd", "sy"};

// FUNCTION: LEGO1 0x1004fce0
// FUNCTION: BETA10 0x1003a5a0
Expand Down
Loading