Fixed shadows warnings
This commit is contained in:
@@ -63,7 +63,7 @@ namespace osgDB
|
||||
struct ObjectData
|
||||
{
|
||||
ObjectData() : written(false) {}
|
||||
ObjectData(const std::string & absolutePath, const std::string & relativePath, bool written) : absolutePath(absolutePath), relativePath(relativePath), written(written) {}
|
||||
ObjectData(const std::string & in_absolutePath, const std::string & in_relativePath, bool in_written) : absolutePath(in_absolutePath), relativePath(in_relativePath), written(in_written) {}
|
||||
std::string absolutePath;
|
||||
std::string relativePath;
|
||||
bool written; ///< Says if write succeeded or not.
|
||||
|
||||
@@ -149,7 +149,7 @@ class OSGDB_EXPORT XmlNode : public osg::Referenced
|
||||
bool writeChildren(const ControlMap& controlMap, std::ostream& fout, const std::string& indent) const;
|
||||
bool writeProperties(const ControlMap& controlMap, std::ostream& fout) const;
|
||||
|
||||
bool readAndReplaceControl(std::string& contents, Input& input);
|
||||
bool readAndReplaceControl(std::string& in_contents, Input& input) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -575,13 +575,13 @@ bool ClassInterface::run(void* objectPtr, const std::string& compoundClassName,
|
||||
ObjectWrapper* ow = osgDB::Registry::instance()->getObjectWrapperManager()->findWrapper(compoundClassName);
|
||||
if (!ow) return false;
|
||||
|
||||
const ObjectWrapper::MethodObjectMap& methodObjectMap = ow->getMethodObjectMap();
|
||||
ObjectWrapper::MethodObjectMap::const_iterator itr = methodObjectMap.find(methodName);
|
||||
while ((itr!=methodObjectMap.end()) && (itr->first==methodName))
|
||||
const ObjectWrapper::MethodObjectMap& ow_methodObjectMap = ow->getMethodObjectMap();
|
||||
for(ObjectWrapper::MethodObjectMap::const_iterator itr = ow_methodObjectMap.find(methodName);
|
||||
(itr!=ow_methodObjectMap.end()) && (itr->first==methodName);
|
||||
++itr)
|
||||
{
|
||||
MethodObject* mo = itr->second.get();
|
||||
if (mo->run(objectPtr, inputParameters, outputParameters)) return true;
|
||||
++itr;
|
||||
}
|
||||
|
||||
const osgDB::StringList& associates = ow->getAssociates();
|
||||
@@ -593,12 +593,12 @@ bool ClassInterface::run(void* objectPtr, const std::string& compoundClassName,
|
||||
if (aow)
|
||||
{
|
||||
const ObjectWrapper::MethodObjectMap& methodObjectMap = aow->getMethodObjectMap();
|
||||
ObjectWrapper::MethodObjectMap::const_iterator itr = methodObjectMap.find(methodName);
|
||||
while ((itr!=methodObjectMap.end()) && (itr->first==methodName))
|
||||
for(ObjectWrapper::MethodObjectMap::const_iterator itr = methodObjectMap.find(methodName);
|
||||
(itr!=methodObjectMap.end()) && (itr->first==methodName);
|
||||
++itr)
|
||||
{
|
||||
MethodObject* mo = itr->second.get();
|
||||
if (mo->run(objectPtr, inputParameters, outputParameters)) return true;
|
||||
++itr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -616,9 +616,9 @@ bool ClassInterface::hasMethod(const std::string& compoundClassName, const std::
|
||||
ObjectWrapper* ow = osgDB::Registry::instance()->getObjectWrapperManager()->findWrapper(compoundClassName);
|
||||
if (!ow) return false;
|
||||
|
||||
const ObjectWrapper::MethodObjectMap& methodObjectMap = ow->getMethodObjectMap();
|
||||
ObjectWrapper::MethodObjectMap::const_iterator itr = methodObjectMap.find(methodName);
|
||||
if (itr!=methodObjectMap.end()) return true;
|
||||
const ObjectWrapper::MethodObjectMap& ow_methodObjectMap = ow->getMethodObjectMap();
|
||||
ObjectWrapper::MethodObjectMap::const_iterator oitr = ow_methodObjectMap.find(methodName);
|
||||
if (oitr!=ow_methodObjectMap.end()) return true;
|
||||
|
||||
const osgDB::StringList& associates = ow->getAssociates();
|
||||
for(osgDB::StringList::const_iterator aitr = associates.begin();
|
||||
|
||||
@@ -229,8 +229,8 @@ osg::Object* DeprecatedDotOsgWrapperManager::readObjectOfType(const basic_type_w
|
||||
}
|
||||
|
||||
std::string name = str;
|
||||
DotOsgWrapperMap::iterator itr = _objectWrapperMap.find(name);
|
||||
if (itr==_objectWrapperMap.end())
|
||||
DotOsgWrapperMap::iterator ow_itr = _objectWrapperMap.find(name);
|
||||
if (ow_itr==_objectWrapperMap.end())
|
||||
{
|
||||
// not found so check if a library::class composite name.
|
||||
std::string token = fr[0].getStr();
|
||||
@@ -256,7 +256,7 @@ osg::Object* DeprecatedDotOsgWrapperManager::readObjectOfType(const basic_type_w
|
||||
}
|
||||
else if (fr[1].isOpenBracket())
|
||||
{
|
||||
DotOsgWrapper* wrapper = itr->second.get();
|
||||
DotOsgWrapper* wrapper = ow_itr->second.get();
|
||||
const osg::Object* proto = wrapper->getPrototype();
|
||||
if (proto==NULL)
|
||||
{
|
||||
|
||||
@@ -168,13 +168,11 @@ bool osgDB::makeDirectory( const std::string &path )
|
||||
}
|
||||
}
|
||||
|
||||
std::string dir = path;
|
||||
std::stack<std::string> paths;
|
||||
while( true )
|
||||
for(std::string dir = path;
|
||||
!dir.empty();
|
||||
dir = getFilePath(dir))
|
||||
{
|
||||
if( dir.empty() )
|
||||
break;
|
||||
|
||||
#ifdef OSG_USE_UTF8_FILENAME
|
||||
if( _wstat64( OSGDB_STRING_TO_FILENAME(dir).c_str(), &stbuf ) < 0 )
|
||||
#else
|
||||
@@ -193,7 +191,6 @@ bool osgDB::makeDirectory( const std::string &path )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
dir = getFilePath(std::string(dir));
|
||||
}
|
||||
|
||||
while( !paths.empty() )
|
||||
@@ -1016,7 +1013,7 @@ bool osgDB::containsCurrentWorkingDirectoryReference(const FilePathList& paths)
|
||||
}
|
||||
|
||||
appendInstallationLibraryFilePaths(filepath);
|
||||
|
||||
|
||||
// Since this is currently the only Objective-C code in the
|
||||
// library, we need an autoreleasepool for obj-c memory management.
|
||||
// If more Obj-C is added, we might move this pool to another
|
||||
@@ -1036,7 +1033,7 @@ bool osgDB::containsCurrentWorkingDirectoryReference(const FilePathList& paths)
|
||||
// the Obj-C strings must be converted down to C strings so
|
||||
// C++ can make them into C++ strings.
|
||||
filepath.push_back( [myBundlePlugInPath UTF8String] );
|
||||
|
||||
|
||||
// add all application-support-folders
|
||||
NSArray *systemSearchPaths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSAllDomainsMask, YES);
|
||||
|
||||
@@ -1117,7 +1114,7 @@ bool osgDB::containsCurrentWorkingDirectoryReference(const FilePathList& paths)
|
||||
|
||||
// Next, check the User's Application Support folder
|
||||
int domains[3] = { kUserDomain, kLocalDomain, kNetworkDomain };
|
||||
|
||||
|
||||
for(unsigned int domain_ndx = 0; domain_ndx < 3; ++domain_ndx)
|
||||
{
|
||||
errCode = FSFindFolder( domains[domain_ndx], kApplicationSupportFolderType, kDontCreateFolder, &f );
|
||||
|
||||
@@ -499,8 +499,7 @@ void OutputStream::writeImage( const osg::Image* img )
|
||||
*this << img->getAllocationMode(); // _allocationMode
|
||||
|
||||
// _data
|
||||
unsigned int size = img->getTotalSizeInBytesIncludingMipmaps();
|
||||
writeSize(size);
|
||||
writeSize( static_cast<unsigned int>(img->getTotalSizeInBytesIncludingMipmaps()) );
|
||||
|
||||
for(osg::Image::DataIterator img_itr(img); img_itr.valid(); ++img_itr)
|
||||
{
|
||||
|
||||
@@ -54,13 +54,15 @@ bool osgDB::queryPlugin(const std::string& fileName, ReaderWriterInfoList& infoL
|
||||
typedef std::set<const ReaderWriter*> ReaderWriterSet;
|
||||
ReaderWriterSet previouslyLoadedReaderWriters;
|
||||
|
||||
const Registry::ReaderWriterList& rwList = osgDB::Registry::instance()->getReaderWriterList();
|
||||
for(Registry::ReaderWriterList::const_iterator itr = rwList.begin();
|
||||
itr != rwList.end();
|
||||
++itr)
|
||||
{
|
||||
const ReaderWriter* rw = itr->get();
|
||||
previouslyLoadedReaderWriters.insert(rw);
|
||||
const Registry::ReaderWriterList& rwList = osgDB::Registry::instance()->getReaderWriterList();
|
||||
for(Registry::ReaderWriterList::const_iterator itr = rwList.begin();
|
||||
itr != rwList.end();
|
||||
++itr)
|
||||
{
|
||||
const ReaderWriter* rw = itr->get();
|
||||
previouslyLoadedReaderWriters.insert(rw);
|
||||
}
|
||||
}
|
||||
|
||||
if (osgDB::Registry::instance()->loadLibrary(fileName))
|
||||
|
||||
@@ -1092,6 +1092,7 @@ std::string Registry::findLibraryFileImplementation(const std::string& filename,
|
||||
|
||||
const FilePathList& filepath = Registry::instance()->getLibraryFilePathList();
|
||||
|
||||
|
||||
std::string fileFound = findFileInPath(filename, filepath,caseSensitivity);
|
||||
if (!fileFound.empty())
|
||||
return fileFound;
|
||||
@@ -1106,7 +1107,7 @@ std::string Registry::findLibraryFileImplementation(const std::string& filename,
|
||||
std::string simpleFileName = getSimpleFileName(filename);
|
||||
if (simpleFileName!=filename)
|
||||
{
|
||||
std::string fileFound = findFileInPath(simpleFileName, filepath,caseSensitivity);
|
||||
fileFound = findFileInPath(simpleFileName, filepath,caseSensitivity);
|
||||
if (!fileFound.empty()) return fileFound;
|
||||
}
|
||||
|
||||
|
||||
@@ -522,7 +522,7 @@ bool XmlNode::writeProperties(const ControlMap& controlMap, std::ostream& fout)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool XmlNode::readAndReplaceControl(std::string& contents, XmlNode::Input& input)
|
||||
bool XmlNode::readAndReplaceControl(std::string& in_contents, XmlNode::Input& input) const
|
||||
{
|
||||
int c = 0;
|
||||
std::string value;
|
||||
@@ -533,7 +533,7 @@ bool XmlNode::readAndReplaceControl(std::string& contents, XmlNode::Input& input
|
||||
{
|
||||
c = input._controlToCharacterMap[value];
|
||||
OSG_INFO<<"Read control character "<<value<<" converted to "<<char(c)<<std::endl;
|
||||
contents.push_back(c);
|
||||
in_contents.push_back(c);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user