From 9647b670e4ff99c4a197501a491b15b4486c9089 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Mon, 19 Apr 2021 15:43:00 +0400 Subject: [PATCH] Do not declare unused variables --- apps/opencs/view/render/terraintexturemode.cpp | 2 +- apps/openmw/mwrender/objectpaging.cpp | 2 +- apps/openmw/mwworld/cellpreloader.cpp | 4 ++-- apps/openmw/mwworld/scene.cpp | 4 ++-- apps/openmw/mwworld/worldimp.cpp | 2 +- components/resource/keyframemanager.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/opencs/view/render/terraintexturemode.cpp b/apps/opencs/view/render/terraintexturemode.cpp index f4a3f461c..fa46cf673 100644 --- a/apps/opencs/view/render/terraintexturemode.cpp +++ b/apps/opencs/view/render/terraintexturemode.cpp @@ -606,7 +606,7 @@ void CSVRender::TerrainTextureMode::createTexture(std::string textureFileName) newId = CSMWorld::LandTexture::createUniqueRecordId(0, counter); if (ltexTable.getRecord(newId).isDeleted() == 0) counter = (counter + 1) % maxCounter; } - catch (const std::exception& e) + catch (const std::exception&) { newId = CSMWorld::LandTexture::createUniqueRecordId(0, counter); freeIndexFound = true; diff --git a/apps/openmw/mwrender/objectpaging.cpp b/apps/openmw/mwrender/objectpaging.cpp index 7386c0069..064d3aa35 100644 --- a/apps/openmw/mwrender/objectpaging.cpp +++ b/apps/openmw/mwrender/objectpaging.cpp @@ -402,7 +402,7 @@ namespace MWRender refs[ref.mRefNum] = ref; } } - catch (std::exception& e) + catch (std::exception&) { continue; } diff --git a/apps/openmw/mwworld/cellpreloader.cpp b/apps/openmw/mwworld/cellpreloader.cpp index 31af5b24b..6bc60968c 100644 --- a/apps/openmw/mwworld/cellpreloader.cpp +++ b/apps/openmw/mwworld/cellpreloader.cpp @@ -84,7 +84,7 @@ namespace MWWorld mTerrain->cacheCell(mTerrainView.get(), mX, mY); mPreloadedObjects.insert(mLandManager->getLand(mX, mY)); } - catch(std::exception& e) + catch(std::exception&) { } } @@ -127,7 +127,7 @@ namespace MWWorld mPreloadedObjects.insert(mBulletShapeManager->getShape(mesh)); } - catch (std::exception& e) + catch (std::exception&) { // ignore error for now, would spam the log too much // error will be shown when visiting the cell diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index 3f050ba36..dae703c8c 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -965,7 +965,7 @@ namespace MWWorld { mSceneManager->getTemplate(mMesh); } - catch (std::exception& e) + catch (std::exception&) { } } @@ -1049,7 +1049,7 @@ namespace MWWorld exteriorPositions.emplace_back(pos, gridCenterToBounds(getNewGridCenter(pos))); } } - catch (std::exception& e) + catch (std::exception&) { // ignore error for now, would spam the log too much } diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index b991c1a03..8bb73c689 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -3895,7 +3895,7 @@ namespace MWWorld if (!model.empty()) scene->preload(model, ref.getPtr().getClass().useAnim()); } - catch(std::exception& e) + catch(std::exception&) { } } diff --git a/components/resource/keyframemanager.cpp b/components/resource/keyframemanager.cpp index f4ab79519..d7eeeeb97 100644 --- a/components/resource/keyframemanager.cpp +++ b/components/resource/keyframemanager.cpp @@ -77,7 +77,7 @@ namespace Resource mTarget.mTextKeys.emplace(parseTimeSignature(line), parseTextKey(line)); } } - catch (std::exception& e) + catch (std::exception&) { Log(Debug::Warning) << "No textkey file found for " << mNormalized; }