summaryrefslogtreecommitdiff
path: root/src/staticstring.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-11-21 20:26:23 +0000
committerMike Buland <eichlan@xagasoft.com>2006-11-21 20:26:23 +0000
commit8fbf5fda24392d2a2ee19d6f40699a5de29da662 (patch)
treeac79c447bc4897d8cc350068504f184fdb8e4cfa /src/staticstring.cpp
parent2bb05378f31311c353d43688fa753822ab9a6461 (diff)
downloadlibbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.gz
libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.bz2
libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.xz
libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.zip
Everything in libbu++ now passes -Wall, this should have been done a long time
ago.
Diffstat (limited to 'src/staticstring.cpp')
-rw-r--r--src/staticstring.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/staticstring.cpp b/src/staticstring.cpp
index 0012b0f..179ba6f 100644
--- a/src/staticstring.cpp
+++ b/src/staticstring.cpp
@@ -61,7 +61,7 @@ int StaticString::getLength()
61 return nLen; 61 return nLen;
62} 62}
63 63
64int StaticString::setLength( int nNewLength ) 64void StaticString::setLength( int nNewLength )
65{ 65{
66 char *lpNewStr = new char[nNewLength+1]; 66 char *lpNewStr = new char[nNewLength+1];
67 if( lpStr != NULL ) 67 if( lpStr != NULL )
@@ -153,7 +153,7 @@ StaticString::operator const char *()
153 return lpStr; 153 return lpStr;
154} 154}
155 155
156char StaticString::getAt( int nIndex ) 156char StaticString::getAt( unsigned int nIndex )
157{ 157{
158 if( nIndex < 0 || nIndex >= nLen ) 158 if( nIndex < 0 || nIndex >= nLen )
159 return '\0'; 159 return '\0';
@@ -161,7 +161,7 @@ char StaticString::getAt( int nIndex )
161 return lpStr[nIndex]; 161 return lpStr[nIndex];
162} 162}
163 163
164void StaticString::setAt( int nIndex, char cVal ) 164void StaticString::setAt( unsigned int nIndex, char cVal )
165{ 165{
166 if( nIndex < 0 || nIndex >= nLen ) 166 if( nIndex < 0 || nIndex >= nLen )
167 return; 167 return;
@@ -169,7 +169,7 @@ void StaticString::setAt( int nIndex, char cVal )
169 lpStr[nIndex] = cVal; 169 lpStr[nIndex] = cVal;
170} 170}
171 171
172char &StaticString::operator[]( int nIndex ) 172char &StaticString::operator[]( unsigned int nIndex )
173{ 173{
174 if( nIndex < 0 || nIndex >= nLen ) 174 if( nIndex < 0 || nIndex >= nLen )
175 return lpStr[0]; 175 return lpStr[0];