Fix assorted compiler warnings found by Clang
This commit is contained in:
@@ -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 "";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user