From f59b92bf4e1f80e0de66cff3e07b4ee4018f7f69 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Mon, 12 Mar 2018 19:10:55 -0500 Subject: [PATCH] winconsole many, many i vars. worldEditor path arguement, lockPtr doubleup. volume.cpp: uneccesary duplicated FileNode::Attributes attr; def --- Engine/source/core/volume.cpp | 1 - Engine/source/gui/worldEditor/worldEditor.cpp | 12 ++++++------ Engine/source/platformWin32/winConsole.cpp | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Engine/source/core/volume.cpp b/Engine/source/core/volume.cpp index 4c3c85b4e..3630f7ffb 100644 --- a/Engine/source/core/volume.cpp +++ b/Engine/source/core/volume.cpp @@ -808,7 +808,6 @@ bool MountSystem::isDirectory(const Path& path, FileSystemRef fsRef) if (fnRef.isNull()) return false; - FileNode::Attributes attr; if (fnRef->getAttributes(&attr)) return attr.flags & FileNode::Directory; return false; diff --git a/Engine/source/gui/worldEditor/worldEditor.cpp b/Engine/source/gui/worldEditor/worldEditor.cpp index da87b6bda..0a5b6f47b 100644 --- a/Engine/source/gui/worldEditor/worldEditor.cpp +++ b/Engine/source/gui/worldEditor/worldEditor.cpp @@ -1454,16 +1454,16 @@ void WorldEditor::renderSplinePath(SimPath::Path *path) } - CameraSpline::Knot::Path path; + CameraSpline::Knot::Path tPath; switch (pathmarker->mSmoothingType) { - case Marker::SmoothingTypeLinear: path = CameraSpline::Knot::LINEAR; break; + case Marker::SmoothingTypeLinear: tPath = CameraSpline::Knot::LINEAR; break; case Marker::SmoothingTypeSpline: - default: path = CameraSpline::Knot::SPLINE; break; + default: tPath = CameraSpline::Knot::SPLINE; break; } - spline.push_back(new CameraSpline::Knot(pos, rot, 1.0f, type, path)); + spline.push_back(new CameraSpline::Knot(pos, rot, 1.0f, type, tPath)); } F32 t = 0.0f; @@ -1559,8 +1559,8 @@ void WorldEditor::renderSplinePath(SimPath::Path *path) // Reset for next pass... vIdx = 0; - void *lockPtr = vb.lock(); - if(!lockPtr) return; + void *nextlockPtr = vb.lock(); + if(!nextlockPtr) return; } } diff --git a/Engine/source/platformWin32/winConsole.cpp b/Engine/source/platformWin32/winConsole.cpp index cc92c2c15..93ce3c68e 100644 --- a/Engine/source/platformWin32/winConsole.cpp +++ b/Engine/source/platformWin32/winConsole.cpp @@ -176,12 +176,12 @@ void WinConsole::process() S32 outpos = 0; ReadConsoleInput(stdIn, rec, 20, &numEvents); - DWORD i; - for(i = 0; i < numEvents; i++) + DWORD evt; + for(evt = 0; evt < numEvents; evt++) { - if(rec[i].EventType == KEY_EVENT) + if(rec[evt].EventType == KEY_EVENT) { - KEY_EVENT_RECORD *ke = &(rec[i].Event.KeyEvent); + KEY_EVENT_RECORD *ke = &(rec[evt].Event.KeyEvent); if(ke->bKeyDown) { switch (ke->uChar.AsciiChar)