From David Callu, warning fixes and removal of spaces at end of lines.

This commit is contained in:
Robert Osfield
2013-06-28 12:00:43 +00:00
parent d82768417d
commit 097aedf23c
100 changed files with 496 additions and 428 deletions

View File

@@ -65,6 +65,8 @@ std::string convertUTF16toUTF8(const wchar_t* source, unsigned sourceLength)
#else
//TODO: Implement for other platforms
OSG_WARN << "ConvertUTF16toUTF8 not implemented." << std::endl;
OSG_UNUSED(source);
OSG_UNUSED(sourceLength);
return std::string();
#endif
}
@@ -97,6 +99,8 @@ std::wstring convertUTF8toUTF16(const char* source, unsigned sourceLength)
#else
//TODO: Implement for other platforms
OSG_WARN << "ConvertUTF8toUTF16 not implemented." << std::endl;
OSG_UNUSED(source);
OSG_UNUSED(sourceLength);
return std::wstring();
#endif
}
@@ -126,6 +130,7 @@ std::string convertStringFromCurrentCodePageToUTF8(const char* source, unsigned
return convertUTF16toUTF8(sUTF16);
#else
OSG_UNUSED(sourceLength);
return source;
#endif
}
@@ -158,6 +163,7 @@ std::string convertStringFromUTF8toCurrentCodePage(const char* source, unsigned
return sDest;
#else
OSG_UNUSED(sourceLength);
return source;
#endif
}

View File

@@ -111,7 +111,7 @@ struct DatabasePager::DatabasePagerCompileCompletedCallback : public osgUtil::In
_pager(pager),
_databaseRequest(databaseRequest) {}
virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* compileSet)
virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* /*compileSet*/)
{
_pager->compileCompleted(_databaseRequest.get());
return true;

View File

@@ -27,7 +27,8 @@ FileList::FileList()
{
}
FileList::FileList(const FileList& fileList, const osg::CopyOp):
FileList::FileList(const FileList& fileList, const osg::CopyOp & copyop):
osg::Object(fileList, copyop),
_files(fileList._files)
{
}
@@ -64,7 +65,8 @@ DatabaseRevision::DatabaseRevision()
{
}
DatabaseRevision::DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp):
DatabaseRevision::DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp & copyop):
osg::Object(revision, copyop),
_databasePath(revision._databasePath),
_filesAdded(revision._filesAdded),
_filesRemoved(revision._filesRemoved),
@@ -109,7 +111,8 @@ DatabaseRevisions::DatabaseRevisions()
{
}
DatabaseRevisions::DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp):
DatabaseRevisions::DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp & copyop):
osg::Object(revisions, copyop),
_databasePath(revisions._databasePath),
_revisionList(revisions._revisionList)
{

View File

@@ -81,7 +81,7 @@ void ImagePager::ReadQueue::clear()
void ImagePager::ReadQueue::add(ImagePager::ImageRequest* imageRequest)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_requestMutex);
_requestList.push_back(imageRequest);
imageRequest->_requestQueue = this;
@@ -221,7 +221,7 @@ void ImagePager::ImageThread::run()
if (image.valid())
{
// OSG_NOTICE<<" successful readImageFile("<<imageRequest->_fileName<<") index to assign = "<<imageRequest->_attachmentIndex<<std::endl;
osg::ImageSequence* is = dynamic_cast<osg::ImageSequence*>(imageRequest->_attachmentPoint.get());
if (is)
{
@@ -329,7 +329,7 @@ osg::Image* ImagePager::readImageFile(const std::string& fileName, const osg::Re
return osgDB::readImageFile(fileName, readOptions);
}
void ImagePager::requestImageFile(const std::string& fileName, osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* framestamp, osg::ref_ptr<osg::Referenced>& imageRequest, const osg::Referenced* options)
void ImagePager::requestImageFile(const std::string& fileName, osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* /*framestamp*/, osg::ref_ptr<osg::Referenced>& imageRequest, const osg::Referenced* options)
{
osgDB::Options* readOptions = dynamic_cast<osgDB::Options*>(const_cast<osg::Referenced*>(options));

View File

@@ -346,7 +346,7 @@ Registry::Registry()
addFileExtensionAlias("tga", "qt");
addFileExtensionAlias("flv", "qt");
addFileExtensionAlias("dv", "qt");
#if !defined(USE_QTKIT)
addFileExtensionAlias("mov", "qt");
addFileExtensionAlias("avi", "qt");
@@ -1062,7 +1062,7 @@ std::string Registry::findDataFileImplementation(const std::string& filename, co
return std::string();
}
std::string Registry::findLibraryFileImplementation(const std::string& filename, const Options* options, CaseSensitivity caseSensitivity)
std::string Registry::findLibraryFileImplementation(const std::string& filename, const Options* /*options*/, CaseSensitivity caseSensitivity)
{
if (filename.empty())
return filename;
@@ -1186,7 +1186,7 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor)
osgDB::getServerProtocol(readFunctor._filename),
osgDB::getFileExtension(readFunctor._filename)
);
if (rw)
{
return readFunctor.doRead(*rw);
@@ -1205,7 +1205,7 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor)
// sort the results so the most relevant (i.e. ERROR_IN_READING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
std::sort(results.begin(), results.end());
ReaderWriter::ReadResult result = results.back();
if (result.message().empty())
{
switch(result.status())
@@ -1327,7 +1327,7 @@ ReaderWriter::WriteResult Registry::writeObjectImplementation(const Object& obj,
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
std::sort(results.begin(), results.end());
ReaderWriter::WriteResult result = results.back();
if (result.message().empty())
{
switch(result.status())
@@ -1383,7 +1383,7 @@ ReaderWriter::WriteResult Registry::writeImageImplementation(const Image& image,
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
std::sort(results.begin(), results.end());
ReaderWriter::WriteResult result = results.back();
if (result.message().empty())
{
switch(result.status())
@@ -1434,11 +1434,11 @@ ReaderWriter::WriteResult Registry::writeHeightFieldImplementation(const HeightF
{
return ReaderWriter::WriteResult("Warning: Could not find plugin to write HeightField to file \""+fileName+"\".");
}
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
std::sort(results.begin(), results.end());
ReaderWriter::WriteResult result = results.back();
if (result.message().empty())
{
switch(result.status())
@@ -1507,7 +1507,7 @@ ReaderWriter::WriteResult Registry::writeNodeImplementation(const Node& node,con
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
std::sort(results.begin(), results.end());
ReaderWriter::WriteResult result = results.back();
if (result.message().empty())
{
switch(result.status())
@@ -1563,7 +1563,7 @@ ReaderWriter::WriteResult Registry::writeShaderImplementation(const Shader& shad
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
std::sort(results.begin(), results.end());
ReaderWriter::WriteResult result = results.back();
if (result.message().empty())
{
switch(result.status())
@@ -1741,11 +1741,11 @@ ReaderWriter* Registry::getReaderWriterForProtocolAndExtension(const std::string
ReaderWriter* result = getReaderWriterForExtension(extension);
if (result && result->acceptsProtocol(protocol))
return result;
result = NULL;
ReaderWriterList results;
getReaderWriterListForProtocol(protocol, results);
for(ReaderWriterList::const_iterator i = results.begin(); i != results.end(); ++i)
{
// if we have a readerwriter which supports wildcards, save it as a fallback
@@ -1754,6 +1754,6 @@ ReaderWriter* Registry::getReaderWriterForProtocolAndExtension(const std::string
else if ((*i)->acceptsExtension(extension))
return i->get();
}
return result ? result : getReaderWriterForExtension("curl");
}

View File

@@ -491,7 +491,7 @@ bool XmlNode::writeString(const ControlMap& controlMap, std::ostream& fout, cons
return true;
}
bool XmlNode::writeChildren(const ControlMap& controlMap, std::ostream& fout, const std::string& indent) const
bool XmlNode::writeChildren(const ControlMap& /*controlMap*/, std::ostream& fout, const std::string& indent) const
{
for(Children::const_iterator citr = children.begin();
citr != children.end();