lego1: Two more operators for MxString (#53)

Followed the hint from @madebr in #31 that the next function in MxString was operator+. The one after that is operator+= and both are at 100%.

Squashed commits:
* Removed unnecessary consts
* Replaced malloc/free with new/delete, which solved swapped regs in operator=
* Use delete[] when freeing char* m_data
This commit is contained in:
MS
2023-06-27 22:57:30 -04:00
committed by GitHub
parent 8da62cc596
commit 2d9af630ba
2 changed files with 47 additions and 12 deletions

View File

@@ -14,7 +14,9 @@ public:
MxString(const char *);
void ToUpperCase();
void ToLowerCase();
const MxString &operator=(MxString *);
MxString& operator=(MxString *);
MxString operator+(const char *);
MxString& operator+=(const char *);
inline const char *GetData() const { return m_data; }