From Markus Trenkwalder, added meanigful return types in

Registry::read(const ReadFunctor& readFunctor) for ERROR_IN_READING_FILE and
FILE_NOT_FOUND cases.
This commit is contained in:
Robert Osfield 2005-10-25 09:54:15 +00:00
parent d0ec2ea08f
commit 032b7484d4

View File

@ -1314,12 +1314,12 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor)
if (num_ERROR_IN_READING_FILE)
{
osg::notify(osg::NOTICE)<<"Warning: error reading file \""<<readFunctor._filename<<"\""<<std::endl;
return NULL;
return ReaderWriter::ReadResult(ReaderWriter::ReadResult::ERROR_IN_READING_FILE);
}
else if (num_FILE_NOT_FOUND)
{
osg::notify(osg::NOTICE)<<"Warning: could not find file \""<<readFunctor._filename<<"\""<<std::endl;
return NULL;
return ReaderWriter::ReadResult(ReaderWriter::ReadResult::FILE_NOT_FOUND);
}
}
}