diff options
author | Michał Konopacki <konopacki.m@gmail.com> | 2012-08-11 20:59:35 +0200 |
---|---|---|
committer | Michał Konopacki <konopacki.m@gmail.com> | 2012-08-11 20:59:35 +0200 |
commit | a9186d19609c61c369d881cdbc40cc8973cf883d (patch) | |
tree | f55d4b999b036702780f0aa8b91ddeb1fb23d186 /src/CBot/CBotString.cpp | |
parent | 7b03a6a2acb9c7ddbae663b27be4b223f984cfcd (diff) | |
download | colobot-a9186d19609c61c369d881cdbc40cc8973cf883d.tar.gz colobot-a9186d19609c61c369d881cdbc40cc8973cf883d.tar.bz2 colobot-a9186d19609c61c369d881cdbc40cc8973cf883d.zip |
Changed GivAttrName() to GetAttrName()
Diffstat (limited to 'src/CBot/CBotString.cpp')
-rw-r--r-- | src/CBot/CBotString.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/CBot/CBotString.cpp b/src/CBot/CBotString.cpp index d471ed0..b146a38 100644 --- a/src/CBot/CBotString.cpp +++ b/src/CBot/CBotString.cpp @@ -138,7 +138,7 @@ CBotString::CBotString(const char* p) m_ptr = NULL; if (m_lg>0) { - m_ptr = (char*)malloc(m_lg+1); + m_ptr = static_cast<char*>(malloc(m_lg+1)); strcpy(m_ptr, p); } } @@ -150,7 +150,7 @@ CBotString::CBotString(const CBotString& srcString) m_ptr = NULL; if (m_lg>0) { - m_ptr = (char*)malloc(m_lg+1); + m_ptr = static_cast<char*>(malloc(m_lg+1)); strcpy(m_ptr, srcString.m_ptr); } } @@ -158,7 +158,7 @@ CBotString::CBotString(const CBotString& srcString) -int CBotString::GivLength() +int CBotString::GetLength() { if (m_ptr == NULL) return 0; return strlen( m_ptr ); @@ -285,7 +285,7 @@ CBotString CBotString::Mid(int start, int lg) if ( lg < 0 ) lg = m_lg - start; - char* p = (char*)malloc(m_lg+1); + char* p = static_cast<char*>(malloc(m_lg+1)); strcpy(p, m_ptr+start); p[lg] = 0; @@ -322,7 +322,7 @@ bool CBotString::LoadString(unsigned int id) m_ptr = NULL; if (m_lg > 0) { - m_ptr = (char*)malloc(m_lg+1); + m_ptr = static_cast<char*>(malloc(m_lg+1)); strcpy(m_ptr, str); return true; } @@ -339,7 +339,7 @@ const CBotString& CBotString::operator=(const CBotString& stringSrc) if (m_lg > 0) { - m_ptr = (char*)malloc(m_lg+1); + m_ptr = static_cast<char*>(malloc(m_lg+1)); strcpy(m_ptr, stringSrc.m_ptr); } @@ -355,7 +355,7 @@ CBotString operator+(const CBotString& string, const char * lpsz) const CBotString& CBotString::operator+(const CBotString& stringSrc) { - char* p = (char*)malloc(m_lg+stringSrc.m_lg+1); + char* p = static_cast<char*>(malloc(m_lg+stringSrc.m_lg+1)); strcpy(p, m_ptr); char* pp = p + m_lg; @@ -392,7 +392,7 @@ const CBotString& CBotString::operator=(const char* pString) if (m_lg != 0) { - m_ptr = (char*)malloc(m_lg+1); + m_ptr = static_cast<char*>(malloc(m_lg+1)); strcpy(m_ptr, pString); } } @@ -549,7 +549,7 @@ CBotStringArray::~CBotStringArray() } -int CBotStringArray::GivSize() +int CBotStringArray::GetSize() { return m_nSize; } |