mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 08:41:16 +00:00
Add /opt:ref for lego1. Reorder MxString header.
This commit is contained in:
parent
70924dd993
commit
679f3868a6
@ -542,6 +542,7 @@ if (MSVC_FOR_DECOMP)
|
||||
# They ensure a recompilation that can be byte/instruction accurate to the original binaries.
|
||||
if (ISLE_BUILD_APP)
|
||||
target_link_options(isle PRIVATE "/OPT:REF")
|
||||
target_link_options(lego1 PRIVATE "/OPT:REF")
|
||||
set_property(TARGET isle ${lego1_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
|
||||
@ -8,19 +8,20 @@
|
||||
// SIZE 0x10
|
||||
class MxString : public MxCore {
|
||||
public:
|
||||
MxString(const MxString& p_str);
|
||||
~MxString() override;
|
||||
const MxString& operator=(const char* p_data);
|
||||
|
||||
MxString();
|
||||
MxString(const char*);
|
||||
MxString(const char*, MxU16);
|
||||
MxString(const MxString& p_str);
|
||||
MxString(const char* p_str);
|
||||
MxString(const char* p_str, MxU16 p_maxlen);
|
||||
~MxString() override;
|
||||
|
||||
void Reverse();
|
||||
void ToUpperCase();
|
||||
void ToLowerCase();
|
||||
|
||||
MxString& operator=(const MxString& p_str);
|
||||
MxString operator+(const MxString& p_str);
|
||||
MxString operator+(const char* 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 char* p_str);
|
||||
|
||||
static void CharSwap(char* p_a, char* p_b);
|
||||
|
||||
@ -115,20 +115,20 @@ MxString& MxString::operator=(const MxString& p_str)
|
||||
|
||||
// FUNCTION: LEGO1 0x100ae510
|
||||
// FUNCTION: BETA10 0x1012c606
|
||||
const MxString& MxString::operator=(const char* p_data)
|
||||
const MxString& MxString::operator=(const char* p_str)
|
||||
{
|
||||
if (this->m_data != p_data) {
|
||||
if (this->m_data != p_str) {
|
||||
delete[] this->m_data;
|
||||
this->m_length = strlen(p_data);
|
||||
this->m_length = strlen(p_str);
|
||||
this->m_data = new char[this->m_length + 1];
|
||||
strcpy(this->m_data, p_data);
|
||||
strcpy(this->m_data, p_str);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x1012c68a
|
||||
MxString MxString::operator+(const MxString& p_str)
|
||||
const MxString MxString::operator+(const MxString& p_str)
|
||||
{
|
||||
MxString tmp;
|
||||
delete[] tmp.m_data;
|
||||
@ -146,7 +146,7 @@ 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
|
||||
MxString MxString::operator+(const char* p_str)
|
||||
const MxString MxString::operator+(const char* p_str)
|
||||
{
|
||||
// MxString constructor allocates 1 byte for m_data, so free that first
|
||||
MxString tmp;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user