diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-28 18:12:17 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-28 18:12:17 +0200 |
| commit | d37f1a7381825d414e4b71c487eea509325f24c3 (patch) | |
| tree | b8df54b1da6a152e6f9a61b91b8feac90bdef4b9 /dev/LibCompiler/BasicString.h | |
| parent | 26b2f0395db53b0bbb1915cd27ac2b99a4dbb0a2 (diff) | |
refactor: Refactor toolchain source code.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/BasicString.h')
| -rw-r--r-- | dev/LibCompiler/BasicString.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dev/LibCompiler/BasicString.h b/dev/LibCompiler/BasicString.h index 53b21d3..5af9da9 100644 --- a/dev/LibCompiler/BasicString.h +++ b/dev/LibCompiler/BasicString.h @@ -26,7 +26,7 @@ class BasicString final { explicit BasicString() = delete; explicit BasicString(SizeType Sz) noexcept : m_Sz(Sz) { - m_Data = new CharType[Sz]; + m_Data = new Char[Sz]; assert(m_Data); } @@ -41,17 +41,17 @@ class BasicString final { LIBCOMPILER_COPY_DEFAULT(BasicString); - CharType* Data(); - const CharType* CData() const; + Char* Data(); + const Char* CData() const; SizeType Length() const; - bool operator==(const CharType* rhs) const; - bool operator!=(const CharType* rhs) const; + bool operator==(const Char* rhs) const; + bool operator!=(const Char* rhs) const; bool operator==(const BasicString& rhs) const; bool operator!=(const BasicString& rhs) const; - BasicString& operator+=(const CharType* rhs); + BasicString& operator+=(const Char* rhs); BasicString& operator+=(const BasicString& rhs); operator bool() { return m_Data && m_Data[0] != 0; } @@ -59,7 +59,7 @@ class BasicString final { bool operator!() { return !m_Data || m_Data[0] == 0; } private: - CharType* m_Data{nullptr}; + Char* m_Data{nullptr}; SizeType m_Sz{0}; SizeType m_Cur{0}; @@ -71,7 +71,7 @@ class BasicString final { * @note These results shall call be delete[] after they're used. */ struct StringBuilder final { - static BasicString Construct(const CharType* data); + static BasicString Construct(const Char* data); static const char* FromInt(const char* fmt, int n); static const char* FromBool(const char* fmt, bool n); static const char* Format(const char* fmt, const char* from); |
