From c96085eb914fb1184107d1ace314ed0d836aebed Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 6 Feb 2015 10:12:04 -0800 Subject: [PATCH] repairs to warnings shown in Xcode --- interface/src/Application.cpp | 5 +---- interface/src/devices/MotionTracker.cpp | 8 ++++++-- interface/src/devices/MotionTracker.h | 2 +- interface/src/devices/RealSense.cpp | 3 --- .../entities-renderer/src/RenderableTextEntityItem.cpp | 3 --- libraries/entities/src/EntityItem.cpp | 2 -- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 233c715421..7adfc03775 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -135,9 +135,6 @@ using namespace std; static unsigned STARFIELD_NUM_STARS = 50000; static unsigned STARFIELD_SEED = 1; -static const int BANDWIDTH_METER_CLICK_MAX_DRAG_LENGTH = 6; // farther dragged clicks are ignored - - const qint64 MAXIMUM_CACHE_SIZE = 10737418240; // 10GB static QTimer* idleTimer = NULL; @@ -225,12 +222,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : _scaleMirror(1.0f), _rotateMirror(0.0f), _raiseMirror(0.0f), + _cursorVisible(true), _lastMouseMove(usecTimestampNow()), _lastMouseMoveWasSimulated(false), _touchAvgX(0.0f), _touchAvgY(0.0f), _isTouchPressed(false), - _cursorVisible(true), _mousePressed(false), _enableProcessOctreeThread(true), _octreeProcessor(), diff --git a/interface/src/devices/MotionTracker.cpp b/interface/src/devices/MotionTracker.cpp index d5272888e7..23ef92df61 100644 --- a/interface/src/devices/MotionTracker.cpp +++ b/interface/src/devices/MotionTracker.cpp @@ -83,8 +83,10 @@ MotionTracker::Index MotionTracker::addJoint(const Semantic& semantic, Index par // Check that the semantic is not already in use Index foundIndex = findJointIndex(semantic); - if (foundIndex >= 0) + if (foundIndex >= 0) { return INVALID_SEMANTIC; + } + // All good then allocate the joint Index newIndex = _jointsArray.size(); @@ -97,8 +99,10 @@ MotionTracker::Index MotionTracker::addJoint(const Semantic& semantic, Index par MotionTracker::Index MotionTracker::findJointIndex(const Semantic& semantic) const { // TODO C++11 auto jointIt = _jointsMap.find(semantic); JointTracker::Map::const_iterator jointIt = _jointsMap.find(semantic); - if (jointIt != _jointsMap.end()) + if (jointIt != _jointsMap.end()) { return (*jointIt).second; + } + return INVALID_SEMANTIC; } diff --git a/interface/src/devices/MotionTracker.h b/interface/src/devices/MotionTracker.h index 6db4374fdf..5dd3f1ca3f 100644 --- a/interface/src/devices/MotionTracker.h +++ b/interface/src/devices/MotionTracker.h @@ -37,7 +37,7 @@ public: // Semantic and Index types to retreive the JointTrackers of this MotionTracker typedef std::string Semantic; - typedef uint32_t Index; + typedef int32_t Index; static const Index INVALID_SEMANTIC = -1; static const Index INVALID_PARENT = -2; diff --git a/interface/src/devices/RealSense.cpp b/interface/src/devices/RealSense.cpp index 7d039a25d9..8cac4e02a8 100644 --- a/interface/src/devices/RealSense.cpp +++ b/interface/src/devices/RealSense.cpp @@ -15,9 +15,6 @@ #include "Menu.h" #include "SharedUtil.h" -const int PALMROOT_NUM_JOINTS = 2; -const int FINGER_NUM_JOINTS = 4; - const DeviceTracker::Name RealSense::NAME = "RealSense"; // find the index of a joint from diff --git a/libraries/entities-renderer/src/RenderableTextEntityItem.cpp b/libraries/entities-renderer/src/RenderableTextEntityItem.cpp index 0855644783..4dc2a07249 100644 --- a/libraries/entities-renderer/src/RenderableTextEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableTextEntityItem.cpp @@ -21,7 +21,6 @@ #include "GLMHelpers.h" const int FIXED_FONT_POINT_SIZE = 40; -const float LINE_SCALE_RATIO = 1.2f; EntityItem* RenderableTextEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) { return new RenderableTextEntityItem(entityID, properties); @@ -35,9 +34,7 @@ void RenderableTextEntityItem::render(RenderArgs* args) { glm::vec3 halfDimensions = dimensions / 2.0f; glm::quat rotation = getRotation(); float leftMargin = 0.1f; - float rightMargin = 0.1f; float topMargin = 0.1f; - float bottomMargin = 0.1f; //qDebug() << "RenderableTextEntityItem::render() id:" << getEntityItemID() << "text:" << getText(); diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index eeb7282814..9717143ec0 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -629,8 +629,6 @@ void EntityItem::setMass(float mass) { } } -const float ENTITY_ITEM_EPSILON_VELOCITY_LENGTH = 0.001f / (float)TREE_SCALE; - void EntityItem::simulate(const quint64& now) { if (_lastSimulated == 0) { _lastSimulated = now;