From fcfa5aa37f814e4b0f6d16e94206dcbbdb5cbe4f Mon Sep 17 00:00:00 2001 From: disinvite Date: Wed, 24 Apr 2024 11:23:16 -0400 Subject: [PATCH] const fix --- LEGO1/omni/include/mxstring.h | 4 ++-- LEGO1/omni/src/common/mxstring.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LEGO1/omni/include/mxstring.h b/LEGO1/omni/include/mxstring.h index 3c268839..5d973e69 100644 --- a/LEGO1/omni/include/mxstring.h +++ b/LEGO1/omni/include/mxstring.h @@ -20,8 +20,8 @@ class MxString : public MxCore { MxString& operator=(const MxString& p_str); const MxString& operator=(const char* p_str); - const MxString operator+(const MxString& p_str); - const MxString operator+(const char* p_str); + MxString operator+(const MxString& p_str) const; + MxString operator+(const char* p_str) const; MxString& operator+=(const char* p_str); static void CharSwap(char* p_a, char* p_b); diff --git a/LEGO1/omni/src/common/mxstring.cpp b/LEGO1/omni/src/common/mxstring.cpp index 07e77514..b33a7f10 100644 --- a/LEGO1/omni/src/common/mxstring.cpp +++ b/LEGO1/omni/src/common/mxstring.cpp @@ -128,7 +128,7 @@ const MxString& MxString::operator=(const char* p_str) } // FUNCTION: BETA10 0x1012c68a -const MxString MxString::operator+(const MxString& p_str) +MxString MxString::operator+(const MxString& p_str) const { MxString tmp; delete[] tmp.m_data; @@ -146,7 +146,7 @@ const MxString MxString::operator+(const MxString& p_str) // This forces MSVC to add $ReturnUdt$ to the stack for 100% match. // FUNCTION: LEGO1 0x100ae580 // FUNCTION: BETA10 0x1012c78d -const MxString MxString::operator+(const char* p_str) +MxString MxString::operator+(const char* p_str) const { // MxString constructor allocates 1 byte for m_data, so free that first MxString tmp;