From: stephan b. <sg...@us...> - 2004-12-23 05:51:28
|
Update of /cvsroot/pclasses/pclasses2/src/Unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30913 Modified Files: String.cpp Log Message: added several returns to NYI operators to please gcc. Commented out some no-op code which throws a warning. Added an ACHTUNG regarding a cast. Index: String.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Unicode/String.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- String.cpp 23 Dec 2004 04:32:18 -0000 1.1 +++ String.cpp 23 Dec 2004 05:51:19 -0000 1.2 @@ -98,10 +98,10 @@ newLength = length; } - else - { - size_t len1; - } +// else +// { +// size_t len1; +// } newData->str = (Char*)newStr; newData->size = sz; @@ -169,7 +169,11 @@ Char& String::operator[](ptrdiff_t pos) throw(OutOfMemory, OutOfBounds) { - if(pos >= _length) + if( static_cast<size_t>( pos ) + /** ACHTUNG ^^^^ cast added by stephan to avoid warning. + @Christian: how do you want to handle this case? + */ + >= _length) throw OutOfBounds("Index is out of bounds", P_SOURCEINFO); makeUnique(); @@ -238,16 +242,19 @@ bool String::operator!=(const String& str) const throw() { return !operator==(str); + return false; } bool String::operator<(const String& str) const throw() { //@todo String::operator< + return false; } bool String::operator>(const String& str) const throw() { //@todo String::operator> + return false; } bool String::operator<=(const String& str) const throw() |