From 7a9c1308be2a12ec3cb3622c43866b34b3b1d806 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Fri, 17 Jul 2015 18:34:13 -0700 Subject: [PATCH] Clean up several more unused local variables --- Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp | 1 - Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp | 1 - Sources/Plasma/PubUtilLib/plAnimation/plMatrixChannel.cpp | 2 +- Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp | 2 -- Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp | 4 +--- Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp | 1 - Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp | 1 - Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp | 4 +--- Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp | 1 - .../PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp | 4 +--- Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp | 1 - 11 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp b/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp index c72a4347..a8eb38e8 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp @@ -972,7 +972,6 @@ std::vector cyAvatar::GetAllWithSameMesh(const plString& clothing_nam PyObject* cyAvatar::GetMatchingClothingItem(const plString& clothing_name) { // Get all the clothes that we can wear - hsTArray clothingList; plClothingItem* match = plClothingMgr::GetClothingMgr()->GetLRMatch(plClothingMgr::GetClothingMgr()->FindItemByName(clothing_name)); if ( match ) { diff --git a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp index 3df7bdb3..f9033566 100644 --- a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp +++ b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp @@ -120,7 +120,6 @@ bool plTimerCallbackManager::CancelCallback(plTimerCallback* pTimer) bool plTimerCallbackManager::CancelCallbacksToKey(const plKey& key) { - const plKey rKey; bool removed = false; for (int i = fCallbacks.Count() - 1; i >= 0 ; i--) diff --git a/Sources/Plasma/PubUtilLib/plAnimation/plMatrixChannel.cpp b/Sources/Plasma/PubUtilLib/plAnimation/plMatrixChannel.cpp index f3be5ea0..21087028 100644 --- a/Sources/Plasma/PubUtilLib/plAnimation/plMatrixChannel.cpp +++ b/Sources/Plasma/PubUtilLib/plAnimation/plMatrixChannel.cpp @@ -903,7 +903,7 @@ bool CompareMatrices2(const hsMatrix44 &matA, const hsMatrix44 &matB, float tole bool c32 = fabs(matA.fMap[3][2] - matB.fMap[3][2]) < tolerance; bool c33 = fabs(matA.fMap[3][3] - matB.fMap[3][3]) < tolerance; - return c00 && c01 && c02 && c03 && c11 && c12 && c13 && c20 && c21 && c22 && c23 && c30 && c31 && c32 && c33; + return c00 && c01 && c02 && c03 && c10 && c11 && c12 && c13 && c20 && c21 && c22 && c23 && c30 && c31 && c32 && c33; } // IAPPLY diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp index a9474bdf..f60ed2c2 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp @@ -177,8 +177,6 @@ plSoundBuffer::ELoadReturnVal plWin32StreamingSound::IPreLoadBuffer( bool playWh { plAudioCore::ChannelSelect select = buffer->GetReaderSelect(); - bool streamCompressed = (buffer->HasFlag(plSoundBuffer::kStreamCompressed) != 0); - /// Open da file plFileName strPath = plFileSystem::GetCWD(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp index 8018e7e7..a98a3b09 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp @@ -149,9 +149,7 @@ plArmatureModBase::~plArmatureModBase() } bool plArmatureModBase::MsgReceive(plMessage* msg) -{ - bool result = false; - +{ plArmatureBrain *curBrain = nil; if (fBrains.size() > 0) { diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp index e3adae43..3f2c3b93 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp @@ -152,7 +152,6 @@ void plSwimCircularCurrentRegion::GetCurrent(plPhysicalControllerCore *physical, physical->GetPositionSim(pos); - bool applyPull = true; hsVector3 pos2Center(center.fX - pos.fX, center.fY - pos.fY, 0.f); float pullVel; float distSq = pos2Center.MagnitudeSquared(); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp index 9af11f4d..3fa2a28d 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp @@ -1967,7 +1967,6 @@ void plDrawableSpans::SortVisibleSpans(const hsTArray& visList, plPipel memset(newStarts, 0, kMaxBufferGroups * kMaxIndexBuffers * sizeof(int16_t)); - uint32_t start = 0; for( i = 0; i < visList.GetCount(); i++ ) { plIcicle* span = (plIcicle*)fSpans[visList[i]]; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp index f4c5a4b9..20d10a96 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp @@ -1450,9 +1450,7 @@ bool plDynaDecalMgr::ICutoutObject(plSceneObject* so, double secs) return retVal; plProfile_BeginTiming(Total); - int numGot = 0; - int j; - for( j = 0; j < di->GetNumDrawables(); j++ ) + for (int j = 0; j < di->GetNumDrawables(); j++) { plDrawableSpans* dr = plDrawableSpans::ConvertNoRef(di->GetDrawable(j)); // Nil dr - it hasn't loaded yet or something. diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp b/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp index 0df567ce..594630d2 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysical/plPhysicsSoundMgr.cpp @@ -149,7 +149,6 @@ void plPhysicsSoundMgr::IStopCollision(const CollidePair& cp) void plPhysicsSoundMgr::IUpdateCollision(const CollidePair& cp) { - const float slideThreshhold = 0.f; hsVector3 v1, v2; plPhysical* physicalA = cp.FirstPhysical(); plPhysical* physicalB = cp.SecondPhysical(); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp index 2abc1ee5..2c61e02b 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp @@ -127,8 +127,6 @@ void plCubicRenderTargetModifier::ICreateRenderRequest( int face ) bool plCubicRenderTargetModifier::IEval( double secs, float del, uint32_t dirty ) { hsPoint3 center; - hsMatrix44 mtx, invMtx; - int i; plRenderRequestMsg *msg; @@ -150,7 +148,7 @@ bool plCubicRenderTargetModifier::IEval( double secs, float del, uint32_t dir fCubic->SetCameraMatrix(center); /// Submit render requests! - for( i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { if( fRequests[ i ] != nil ) { diff --git a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp index 7dfed3a7..9e271f1f 100644 --- a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp +++ b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp @@ -1902,7 +1902,6 @@ hsRef VaultCreateNodeAndWait ( plVault::NodeTypes nodeType, ENetError * result ) { - hsRef node; hsRef templateNode = new RelVaultNode; templateNode->SetNodeType(nodeType);