Merge pull request #4241 from birarda/master

repairs for warnings exposed in Xcode
This commit is contained in:
Brad Hefta-Gaub 2015-02-06 11:49:29 -08:00
commit 79b397fc3f
6 changed files with 8 additions and 15 deletions

View file

@ -135,9 +135,6 @@ using namespace std;
static unsigned STARFIELD_NUM_STARS = 50000; static unsigned STARFIELD_NUM_STARS = 50000;
static unsigned STARFIELD_SEED = 1; 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 const qint64 MAXIMUM_CACHE_SIZE = 10737418240; // 10GB
static QTimer* idleTimer = NULL; static QTimer* idleTimer = NULL;
@ -225,12 +222,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
_scaleMirror(1.0f), _scaleMirror(1.0f),
_rotateMirror(0.0f), _rotateMirror(0.0f),
_raiseMirror(0.0f), _raiseMirror(0.0f),
_cursorVisible(true),
_lastMouseMove(usecTimestampNow()), _lastMouseMove(usecTimestampNow()),
_lastMouseMoveWasSimulated(false), _lastMouseMoveWasSimulated(false),
_touchAvgX(0.0f), _touchAvgX(0.0f),
_touchAvgY(0.0f), _touchAvgY(0.0f),
_isTouchPressed(false), _isTouchPressed(false),
_cursorVisible(true),
_mousePressed(false), _mousePressed(false),
_enableProcessOctreeThread(true), _enableProcessOctreeThread(true),
_octreeProcessor(), _octreeProcessor(),

View file

@ -83,8 +83,10 @@ MotionTracker::Index MotionTracker::addJoint(const Semantic& semantic, Index par
// Check that the semantic is not already in use // Check that the semantic is not already in use
Index foundIndex = findJointIndex(semantic); Index foundIndex = findJointIndex(semantic);
if (foundIndex >= 0) if (foundIndex >= 0) {
return INVALID_SEMANTIC; return INVALID_SEMANTIC;
}
// All good then allocate the joint // All good then allocate the joint
Index newIndex = _jointsArray.size(); 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 { MotionTracker::Index MotionTracker::findJointIndex(const Semantic& semantic) const {
// TODO C++11 auto jointIt = _jointsMap.find(semantic); // TODO C++11 auto jointIt = _jointsMap.find(semantic);
JointTracker::Map::const_iterator jointIt = _jointsMap.find(semantic); JointTracker::Map::const_iterator jointIt = _jointsMap.find(semantic);
if (jointIt != _jointsMap.end()) if (jointIt != _jointsMap.end()) {
return (*jointIt).second; return (*jointIt).second;
}
return INVALID_SEMANTIC; return INVALID_SEMANTIC;
} }

View file

@ -37,7 +37,7 @@ public:
// Semantic and Index types to retreive the JointTrackers of this MotionTracker // Semantic and Index types to retreive the JointTrackers of this MotionTracker
typedef std::string Semantic; typedef std::string Semantic;
typedef uint32_t Index; typedef int32_t Index;
static const Index INVALID_SEMANTIC = -1; static const Index INVALID_SEMANTIC = -1;
static const Index INVALID_PARENT = -2; static const Index INVALID_PARENT = -2;

View file

@ -15,9 +15,6 @@
#include "Menu.h" #include "Menu.h"
#include "SharedUtil.h" #include "SharedUtil.h"
const int PALMROOT_NUM_JOINTS = 2;
const int FINGER_NUM_JOINTS = 4;
const DeviceTracker::Name RealSense::NAME = "RealSense"; const DeviceTracker::Name RealSense::NAME = "RealSense";
// find the index of a joint from // find the index of a joint from

View file

@ -21,7 +21,6 @@
#include "GLMHelpers.h" #include "GLMHelpers.h"
const int FIXED_FONT_POINT_SIZE = 40; const int FIXED_FONT_POINT_SIZE = 40;
const float LINE_SCALE_RATIO = 1.2f;
EntityItem* RenderableTextEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) { EntityItem* RenderableTextEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) {
return new RenderableTextEntityItem(entityID, properties); return new RenderableTextEntityItem(entityID, properties);
@ -35,9 +34,7 @@ void RenderableTextEntityItem::render(RenderArgs* args) {
glm::vec3 halfDimensions = dimensions / 2.0f; glm::vec3 halfDimensions = dimensions / 2.0f;
glm::quat rotation = getRotation(); glm::quat rotation = getRotation();
float leftMargin = 0.1f; float leftMargin = 0.1f;
float rightMargin = 0.1f;
float topMargin = 0.1f; float topMargin = 0.1f;
float bottomMargin = 0.1f;
//qDebug() << "RenderableTextEntityItem::render() id:" << getEntityItemID() << "text:" << getText(); //qDebug() << "RenderableTextEntityItem::render() id:" << getEntityItemID() << "text:" << getText();

View file

@ -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) { void EntityItem::simulate(const quint64& now) {
if (_lastSimulated == 0) { if (_lastSimulated == 0) {
_lastSimulated = now; _lastSimulated = now;