diff options
author | Alexis211 <alexis211@gmail.com> | 2009-09-13 15:36:39 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-09-13 15:36:39 +0200 |
commit | ace1914398633e05970f634ddec297665dfda7c6 (patch) | |
tree | c244c222a7693b5257e1e955b5ed372530035b19 /Source/Kernel/Library/String.class.cpp | |
parent | 0b760a50b5aee05f1f34c1599b547c8b78d1d737 (diff) | |
download | Melon-ace1914398633e05970f634ddec297665dfda7c6.tar.gz Melon-ace1914398633e05970f634ddec297665dfda7c6.zip |
RamFS creatable but not loadable yet
Diffstat (limited to 'Source/Kernel/Library/String.class.cpp')
-rw-r--r-- | Source/Kernel/Library/String.class.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Kernel/Library/String.class.cpp b/Source/Kernel/Library/String.class.cpp index 8df5cbf..b8e01d5 100644 --- a/Source/Kernel/Library/String.class.cpp +++ b/Source/Kernel/Library/String.class.cpp @@ -136,7 +136,7 @@ bool String::operator== (const char* string) { return true; } -String& String::operator+= (String &other) { +String& String::operator+= (const String &other) { WChar* newdata = new WChar[m_length + other.m_length + 1]; for (u32int i = 0; i < m_length; i++) { newdata[i] = m_string[i]; @@ -181,7 +181,7 @@ String& String::operator+= (WChar other) { return *this; } -String& String::operator+ (String &other) { //Can be optimized +String& String::operator+ (const String &other) { //Can be optimized String ret(*this); return (ret += other); } @@ -236,11 +236,11 @@ u32int String::toInt16() { return number; } -WChar& String::operator[] (int index) { +WChar& String::operator[] (int index) const { return m_string[index]; } -u32int String::size() { +u32int String::size() const { return m_length; } @@ -250,7 +250,7 @@ void String::clear() { m_string = 0; } -bool String::empty() { +bool String::empty() const { return (m_length == 0); } |