From d1623e6e4d7fa0d07f30121d69ad3da1941c16dc Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 11 Mar 2014 11:45:13 -0700 Subject: [PATCH] fixes for warnings produced by Xcode 5.1 --- animation-server/src/AnimationServer.cpp | 5 ----- domain-server/src/DomainServer.cpp | 2 -- interface/src/Application.cpp | 4 ---- interface/src/Audio.cpp | 3 --- interface/src/avatar/Avatar.cpp | 22 ---------------------- interface/src/avatar/MyAvatar.cpp | 7 ------- interface/src/starfield/Controller.h | 2 +- libraries/avatars/src/AvatarData.cpp | 2 -- libraries/particles/src/Particle.cpp | 5 ----- 9 files changed, 1 insertion(+), 51 deletions(-) diff --git a/animation-server/src/AnimationServer.cpp b/animation-server/src/AnimationServer.cpp index a013eaaf5c..f59d9db098 100644 --- a/animation-server/src/AnimationServer.cpp +++ b/animation-server/src/AnimationServer.cpp @@ -364,7 +364,6 @@ float danceFloorGradientIncrement = 1.0f / FRAMES_PER_BEAT; const float DANCE_FLOOR_MAX_GRADIENT = 1.0f; const float DANCE_FLOOR_MIN_GRADIENT = 0.0f; const int DANCE_FLOOR_VOXELS_PER_PACKET = 100; -const int PACKETS_PER_DANCE_FLOOR = DANCE_FLOOR_VOXELS_PER_PACKET / (DANCE_FLOOR_WIDTH * DANCE_FLOOR_LENGTH); int danceFloorColors[DANCE_FLOOR_WIDTH][DANCE_FLOOR_LENGTH]; void sendDanceFloor() { @@ -467,8 +466,6 @@ const float BILLBOARD_MAX_GRADIENT = 1.0f; const float BILLBOARD_MIN_GRADIENT = 0.0f; const float BILLBOARD_LIGHT_SIZE = 0.125f / TREE_SCALE; // approximately 1/8 meter per light const int VOXELS_PER_PACKET = 81; -const int PACKETS_PER_BILLBOARD = VOXELS_PER_PACKET / (BILLBOARD_HEIGHT * BILLBOARD_WIDTH); - // top to bottom... bool billboardMessage[BILLBOARD_HEIGHT][BILLBOARD_WIDTH] = { @@ -541,14 +538,12 @@ static void sendBillboard() { } bool roadInitialized = false; -const int ROAD_WIDTH_METERS = 3.0f; const int BRICKS_ACROSS_ROAD = 32; const float ROAD_BRICK_SIZE = 0.125f/TREE_SCALE; //(ROAD_WIDTH_METERS / TREE_SCALE) / BRICKS_ACROSS_ROAD; // in voxel units const int ROAD_LENGTH = 1.0f / ROAD_BRICK_SIZE; // in bricks const int ROAD_WIDTH = BRICKS_ACROSS_ROAD; // in bricks glm::vec3 roadPosition(0.5f - (ROAD_BRICK_SIZE * BRICKS_ACROSS_ROAD), 0.0f, 0.0f); const int BRICKS_PER_PACKET = 32; // guessing -const int PACKETS_PER_ROAD = VOXELS_PER_PACKET / (ROAD_LENGTH * ROAD_WIDTH); void doBuildStreet() { if (roadInitialized) { diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index 6eb59bb3df..e5979c561f 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -359,8 +359,6 @@ void DomainServer::addNodeToNodeListAndConfirmConnection(const QByteArray& packe sendDomainListToNode(newNode, senderSockAddr, nodeInterestListFromPacket(packet, numPreInterestBytes)); } -const int NUM_BYTES_DATA_SERVER_REGISTRATION_TOKEN = 16; - int DomainServer::parseNodeDataFromByteArray(NodeType_t& nodeType, HifiSockAddr& publicSockAddr, HifiSockAddr& localSockAddr, const QByteArray& packet, const HifiSockAddr& senderSockAddr) { diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a2ab5fcb2a..032e849f0a 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1138,7 +1138,6 @@ void Application::touchEndEvent(QTouchEvent* event) { } -const bool USE_MOUSEWHEEL = false; void Application::wheelEvent(QWheelEvent* event) { _controllerScriptingInterface.emitWheelEvent(event); // send events to any registered scripts @@ -1327,7 +1326,6 @@ glm::vec3 Application::getMouseVoxelWorldCoordinates(const VoxelDetail& mouseVox (mouseVoxel.z + mouseVoxel.s / 2.f) * TREE_SCALE); } -const int MAXIMUM_EDIT_VOXEL_MESSAGE_SIZE = 1500; struct SendVoxelsOperationArgs { const unsigned char* newBaseOctCode; }; @@ -1607,8 +1605,6 @@ void Application::shrinkMirrorView() { } } -const float MAX_AVATAR_EDIT_VELOCITY = 1.0f; -const float MAX_VOXEL_EDIT_DISTANCE = 50.0f; const float HEAD_SPHERE_RADIUS = 0.07f; bool Application::isLookingAtMyAvatar(Avatar* avatar) { diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 7f6f1bcb05..7ab5f0f37b 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -32,9 +32,6 @@ #include "Menu.h" #include "Util.h" -static const float JITTER_BUFFER_LENGTH_MSECS = 12; -static const short JITTER_BUFFER_SAMPLES = JITTER_BUFFER_LENGTH_MSECS * NUM_AUDIO_CHANNELS * (SAMPLE_RATE / 1000.0); - static const float AUDIO_CALLBACK_MSECS = (float) NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL / (float)SAMPLE_RATE * 1000.0; static const int NUMBER_OF_NOISE_SAMPLE_FRAMES = 300; diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 2301822e28..ec2e658652 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -31,28 +31,6 @@ using namespace std; const glm::vec3 DEFAULT_UP_DIRECTION(0.0f, 1.0f, 0.0f); -const float YAW_MAG = 500.0f; -const float MY_HAND_HOLDING_PULL = 0.2f; -const float YOUR_HAND_HOLDING_PULL = 1.0f; -const float BODY_SPRING_DEFAULT_TIGHTNESS = 1000.0f; -const float BODY_SPRING_FORCE = 300.0f; -const float BODY_SPRING_DECAY = 16.0f; -const float COLLISION_RADIUS_SCALAR = 1.2f; // pertains to avatar-to-avatar collisions -const float COLLISION_BODY_FORCE = 30.0f; // pertains to avatar-to-avatar collisions -const float HEAD_ROTATION_SCALE = 0.70f; -const float HEAD_ROLL_SCALE = 0.40f; -const float HEAD_MAX_PITCH = 45; -const float HEAD_MIN_PITCH = -45; -const float HEAD_MAX_YAW = 85; -const float HEAD_MIN_YAW = -85; -const float AVATAR_BRAKING_STRENGTH = 40.0f; -const float MOUSE_RAY_TOUCH_RANGE = 0.01f; -const float FLOATING_HEIGHT = 0.13f; -const bool USING_HEAD_LEAN = false; -const float LEAN_SENSITIVITY = 0.15f; -const float LEAN_MAX = 0.45f; -const float LEAN_AVERAGING = 10.0f; -const float HEAD_RATE_MAX = 50.f; const int NUM_BODY_CONE_SIDES = 9; const float CHAT_MESSAGE_SCALE = 0.0015f; const float CHAT_MESSAGE_HEIGHT = 0.1f; diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 7108e0d0cc..ab72546e89 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -37,12 +37,7 @@ const glm::vec3 DEFAULT_UP_DIRECTION(0.0f, 1.0f, 0.0f); const float YAW_MAG = 500.0f; const float PITCH_MAG = 100.0f; const float COLLISION_RADIUS_SCALAR = 1.2f; // pertains to avatar-to-avatar collisions -const float COLLISION_BODY_FORCE = 30.0f; // pertains to avatar-to-avatar collisions const float COLLISION_RADIUS_SCALE = 0.125f; -const float MOUSE_RAY_TOUCH_RANGE = 0.01f; -const bool USING_HEAD_LEAN = false; -const float SKIN_COLOR[] = {1.0f, 0.84f, 0.66f}; -const float DARK_SKIN_COLOR[] = {0.9f, 0.78f, 0.63f}; const float DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS = 5 * 1000; @@ -329,8 +324,6 @@ void MyAvatar::simulate(float deltaTime) { maybeUpdateBillboard(); } -const float MAX_PITCH = 90.0f; - // Update avatar head rotation with sensor data void MyAvatar::updateFromGyros(float deltaTime) { Faceshift* faceshift = Application::getInstance()->getFaceshift(); diff --git a/interface/src/starfield/Controller.h b/interface/src/starfield/Controller.h index c5ade48442..5403d2fb75 100755 --- a/interface/src/starfield/Controller.h +++ b/interface/src/starfield/Controller.h @@ -8,7 +8,7 @@ // #ifndef __interface__starfield__Controller__ -#define __interface__starfield__Confroller__ +#define __interface__starfield__Controller__ #include diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 2483e0514b..7a1781f554 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -26,8 +26,6 @@ using namespace std; -static const float fingerVectorRadix = 4; // bits of precision when converting from float<->fixed - QNetworkAccessManager* AvatarData::networkAccessManager = NULL; AvatarData::AvatarData() : diff --git a/libraries/particles/src/Particle.cpp b/libraries/particles/src/Particle.cpp index 1a0ca7680b..f4a5785bad 100644 --- a/libraries/particles/src/Particle.cpp +++ b/libraries/particles/src/Particle.cpp @@ -815,11 +815,6 @@ void Particle::applyHardCollision(const CollisionInfo& collisionInfo) { setVelocity(velocity); } -// MIN_VALID_SPEED is obtained by computing speed gained at one gravity during the shortest expected frame period -// This is a HACK for particles that bounce in a 1.0 gravitational field and should eventually be made more universal. -const float MIN_EXPECTED_FRAME_PERIOD = 0.005f; // 1/200th of a second -const float MIN_VALID_SPEED = 9.8 * MIN_EXPECTED_FRAME_PERIOD / (float)(TREE_SCALE); - void Particle::update(const quint64& now) { float timeElapsed = (float)(now - _lastUpdated) / (float)(USECS_PER_SECOND); _lastUpdated = now;