Fix assorted compiler warnings found by Clang

This commit is contained in:
James Turner
2011-10-28 12:07:35 +01:00
parent c6d5cbd52c
commit 95ddc04a73
8 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -206,7 +206,7 @@ string SGPath::base() const
return path;
}
if (index >= 0) {
if (index != string::npos) {
return path.substr(0, index);
} else {
return path;
@@ -256,7 +256,7 @@ string SGPath::complete_lower_extension() const
}
string::size_type firstDot = path.find(".", index);
if ((firstDot >= 0) && (path.find(sgDirPathSep, firstDot) == string::npos)) {
if ((firstDot != string::npos) && (path.find(sgDirPathSep, firstDot) == string::npos)) {
return boost::to_lower_copy(path.substr(firstDot + 1));
} else {
return "";
+1 -1
View File
@@ -124,7 +124,7 @@ public:
std::string dir() const;
/**
* Get the base part of the path (everything but the extension.)
* Get the base part of the path (everything but the final extension.)
* @return the base string
*/
std::string base() const;
+1 -1
View File
@@ -167,7 +167,7 @@ gzfilebuf::close()
std::streampos
gzfilebuf::seekoff( std::streamoff, ios_seekdir, int )
gzfilebuf::seekoff( std::streamoff, ios_seekdir, ios_openmode )
{
return std::streampos(EOF);
}
+1 -1
View File
@@ -90,7 +90,7 @@ public:
bool is_open() const { return (file != NULL); }
/** @return stream position */
virtual std::streampos seekoff( std::streamoff off, ios_seekdir way, int which );
virtual std::streampos seekoff( std::streamoff off, ios_seekdir way, ios_openmode which );
/** sync the stream */
virtual int sync();