mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-25 23:09:41 +00:00
Fix warning C4456 (declaration hides previous local declaration)
This commit is contained in:
parent
cc984497d7
commit
d70064efe4
11 changed files with 43 additions and 43 deletions
|
@ -64,11 +64,11 @@ void CSMDoc::Loader::load()
|
|||
CSMWorld::UniversalId log (CSMWorld::UniversalId::Type_LoadErrorLog, 0);
|
||||
|
||||
{ // silence a g++ warning
|
||||
for (CSMDoc::Messages::Iterator iter (messages.begin());
|
||||
iter!=messages.end(); ++iter)
|
||||
for (CSMDoc::Messages::Iterator iter2 (messages.begin());
|
||||
iter2!=messages.end(); ++iter2)
|
||||
{
|
||||
document->getReport (log)->add (*iter);
|
||||
emit loadMessage (document, iter->mMessage);
|
||||
document->getReport (log)->add (*iter2);
|
||||
emit loadMessage (document, iter2->mMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -119,11 +119,11 @@ void CSMDoc::WriteDialogueCollectionStage::perform (int stage, Messages& message
|
|||
|
||||
for (CSMWorld::InfoCollection::RecordConstIterator iter (range.first); iter!=range.second; ++iter)
|
||||
{
|
||||
CSMWorld::RecordBase::State state = iter->mState;
|
||||
CSMWorld::RecordBase::State recState = iter->mState;
|
||||
|
||||
if (state==CSMWorld::RecordBase::State_Modified ||
|
||||
state==CSMWorld::RecordBase::State_ModifiedOnly ||
|
||||
state==CSMWorld::RecordBase::State_Deleted)
|
||||
if (recState==CSMWorld::RecordBase::State_Modified ||
|
||||
recState==CSMWorld::RecordBase::State_ModifiedOnly ||
|
||||
recState==CSMWorld::RecordBase::State_Deleted)
|
||||
{
|
||||
infoModified = true;
|
||||
break;
|
||||
|
|
|
@ -313,15 +313,15 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& ke
|
|||
|
||||
nodes.push_back (node);
|
||||
|
||||
Token token = getNextToken();
|
||||
Token token2 = getNextToken();
|
||||
|
||||
if (!token || (token.mType!=Token::Type_Close && token.mType!=Token::Type_Comma))
|
||||
if (!token2 || (token2.mType!=Token::Type_Close && token2.mType!=Token::Type_Comma))
|
||||
{
|
||||
error();
|
||||
return boost::shared_ptr<Node>();
|
||||
}
|
||||
|
||||
if (token.mType==Token::Type_Close)
|
||||
if (token2.mType==Token::Type_Close)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -183,11 +183,11 @@ void CSMTools::MergeLandTexturesStage::perform (int stage, CSMDoc::Messages& mes
|
|||
CSMWorld::LandTexture texture =
|
||||
mState.mSource.getData().getLandTextures().getRecord (index).get();
|
||||
|
||||
std::ostringstream stream;
|
||||
stream << mNext->second-1 << "_0";
|
||||
std::ostringstream stream2;
|
||||
stream2 << mNext->second-1 << "_0";
|
||||
|
||||
texture.mIndex = mNext->second-1;
|
||||
texture.mId = stream.str();
|
||||
texture.mId = stream2.str();
|
||||
|
||||
CSMWorld::Record<CSMWorld::LandTexture> newRecord (
|
||||
CSMWorld::RecordBase::State_ModifiedOnly, 0, &texture);
|
||||
|
|
|
@ -172,9 +172,9 @@ void CSMWorld::IdTable::setRecord (const std::string& id, const RecordBase& reco
|
|||
|
||||
if (index==-1)
|
||||
{
|
||||
int index = mIdCollection->getAppendIndex (id, type);
|
||||
int index2 = mIdCollection->getAppendIndex (id, type);
|
||||
|
||||
beginInsertRows (QModelIndex(), index, index);
|
||||
beginInsertRows (QModelIndex(), index2, index2);
|
||||
|
||||
mIdCollection->appendRecord (record, type);
|
||||
|
||||
|
|
|
@ -19,31 +19,31 @@ void CSMWorld::InfoCollection::load (const Info& record, bool base)
|
|||
record2.mState = base ? RecordBase::State_BaseOnly : RecordBase::State_ModifiedOnly;
|
||||
(base ? record2.mBase : record2.mModified) = record;
|
||||
|
||||
int index = -1;
|
||||
int index2 = -1;
|
||||
|
||||
std::string topic = Misc::StringUtils::lowerCase (record2.get().mTopicId);
|
||||
|
||||
if (!record2.get().mPrev.empty())
|
||||
{
|
||||
index = getInfoIndex (record2.get().mPrev, topic);
|
||||
index2 = getInfoIndex (record2.get().mPrev, topic);
|
||||
|
||||
if (index!=-1)
|
||||
++index;
|
||||
if (index2!=-1)
|
||||
++index2;
|
||||
}
|
||||
|
||||
if (index==-1 && !record2.get().mNext.empty())
|
||||
if (index2==-1 && !record2.get().mNext.empty())
|
||||
{
|
||||
index = getInfoIndex (record2.get().mNext, topic);
|
||||
index2 = getInfoIndex (record2.get().mNext, topic);
|
||||
}
|
||||
|
||||
if (index==-1)
|
||||
if (index2==-1)
|
||||
{
|
||||
Range range = getTopicRange (topic);
|
||||
|
||||
index = std::distance (getRecords().begin(), range.second);
|
||||
index2 = std::distance (getRecords().begin(), range.second);
|
||||
}
|
||||
|
||||
insertRecord (record2, index);
|
||||
insertRecord (record2, index2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -74,9 +74,9 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
|
|||
std::cerr << "Position: #" << index.first << " " << index.second
|
||||
<<", Target #"<< mref.mTarget[0] << " " << mref.mTarget[1] << std::endl;
|
||||
|
||||
std::ostringstream stream;
|
||||
stream << "#" << mref.mTarget[0] << " " << mref.mTarget[1];
|
||||
ref.mCell = stream.str(); // overwrite
|
||||
std::ostringstream stream2;
|
||||
stream2 << "#" << mref.mTarget[0] << " " << mref.mTarget[1];
|
||||
ref.mCell = stream2.str(); // overwrite
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -878,10 +878,10 @@ void CSMWorld::RefIdCollection::load (ESM::ESMReader& reader, bool base, Univers
|
|||
if (index==-1)
|
||||
{
|
||||
// new record
|
||||
int index = mData.getAppendIndex (type);
|
||||
int newIndex = mData.getAppendIndex (type);
|
||||
mData.appendRecord (type, id, base);
|
||||
|
||||
RefIdData::LocalIndex localIndex = mData.globalToLocalIndex (index);
|
||||
RefIdData::LocalIndex localIndex = mData.globalToLocalIndex (newIndex);
|
||||
|
||||
mData.load (localIndex, reader, base);
|
||||
|
||||
|
|
|
@ -26,22 +26,22 @@ CSMWorld::Resources::Resources (const std::string& baseDirectory, UniversalId::T
|
|||
Ogre::StringVectorPtr resources =
|
||||
Ogre::ResourceGroupManager::getSingleton().listResourceNames (*iter);
|
||||
|
||||
for (Ogre::StringVector::const_iterator iter (resources->begin());
|
||||
iter!=resources->end(); ++iter)
|
||||
for (Ogre::StringVector::const_iterator iter2 (resources->begin());
|
||||
iter2!=resources->end(); ++iter2)
|
||||
{
|
||||
if (static_cast<int> (iter->size())<baseSize+1 ||
|
||||
iter->substr (0, baseSize)!=mBaseDirectory ||
|
||||
((*iter)[baseSize]!='/' && (*iter)[baseSize]!='\\'))
|
||||
if (static_cast<int> (iter2->size())<baseSize+1 ||
|
||||
iter2->substr (0, baseSize)!=mBaseDirectory ||
|
||||
((*iter2)[baseSize]!='/' && (*iter2)[baseSize]!='\\'))
|
||||
continue;
|
||||
|
||||
if (extensions)
|
||||
{
|
||||
std::string::size_type index = iter->find_last_of ('.');
|
||||
std::string::size_type index = iter2->find_last_of ('.');
|
||||
|
||||
if (index==std::string::npos)
|
||||
continue;
|
||||
|
||||
std::string extension = iter->substr (index+1);
|
||||
std::string extension = iter2->substr (index+1);
|
||||
|
||||
int i = 0;
|
||||
|
||||
|
@ -53,7 +53,7 @@ CSMWorld::Resources::Resources (const std::string& baseDirectory, UniversalId::T
|
|||
continue;
|
||||
}
|
||||
|
||||
std::string file = iter->substr (baseSize+1);
|
||||
std::string file = iter2->substr (baseSize+1);
|
||||
mFiles.push_back (file);
|
||||
std::replace (file.begin(), file.end(), '\\', '/');
|
||||
mIndex.insert (std::make_pair (
|
||||
|
|
|
@ -105,7 +105,7 @@ TextOverlay::TextOverlay(const Ogre::MovableObject* obj, const Ogre::Camera* cam
|
|||
"TransOverlayMaterial");
|
||||
if(mQuadMaterial.isNull())
|
||||
{
|
||||
Ogre::MaterialPtr mQuadMaterial = Ogre::MaterialManager::getSingleton().create(
|
||||
mQuadMaterial = Ogre::MaterialManager::getSingleton().create(
|
||||
"TransOverlayMaterial",
|
||||
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true );
|
||||
Ogre::Pass *pass = mQuadMaterial->getTechnique( 0 )->getPass( 0 );
|
||||
|
|
|
@ -667,14 +667,14 @@ void CSVWorld::EditWidget::remake(int row)
|
|||
int displayRole = tree->nestedHeaderData (i, col,
|
||||
Qt::Horizontal, CSMWorld::ColumnBase::Role_Display).toInt();
|
||||
|
||||
CSMWorld::ColumnBase::Display display =
|
||||
CSMWorld::ColumnBase::Display display2 =
|
||||
static_cast<CSMWorld::ColumnBase::Display> (displayRole);
|
||||
|
||||
mNestedTableDispatcher->makeDelegate (display);
|
||||
mNestedTableDispatcher->makeDelegate (display2);
|
||||
|
||||
// FIXME: assumed all columns are editable
|
||||
QWidget* editor =
|
||||
mNestedTableDispatcher->makeEditor (display, tree->index (0, col, tree->index(row, i)));
|
||||
mNestedTableDispatcher->makeEditor (display2, tree->index (0, col, tree->index(row, i)));
|
||||
if (editor)
|
||||
{
|
||||
mNestedTableMapper->addMapping (editor, col);
|
||||
|
@ -699,7 +699,7 @@ void CSVWorld::EditWidget::remake(int row)
|
|||
label->setEnabled(false);
|
||||
}
|
||||
|
||||
createEditorContextMenu(editor, display, row);
|
||||
createEditorContextMenu(editor, display2, row);
|
||||
}
|
||||
}
|
||||
mNestedTableMapper->setCurrentModelIndex(tree->index(0, 0, tree->index(row, i)));
|
||||
|
|
Loading…
Reference in a new issue