fixed some compiler warnings

This commit is contained in:
ZappoMan 2013-07-10 16:33:27 -07:00
parent 4afda27ee0
commit 6694ef3869
5 changed files with 6 additions and 7 deletions

View file

@ -501,12 +501,13 @@ void runTimingTests() {
printLog("powf(f, 0.5) usecs: %f\n", 1000.0f * elapsedMsecs / (float) numTests); printLog("powf(f, 0.5) usecs: %f\n", 1000.0f * elapsedMsecs / (float) numTests);
// Vector Math // Vector Math
float distance;
glm::vec3 pointA(randVector()), pointB(randVector()); glm::vec3 pointA(randVector()), pointB(randVector());
gettimeofday(&startTime, NULL); gettimeofday(&startTime, NULL);
for (int i = 1; i < numTests; i++) { for (int i = 1; i < numTests; i++) {
//glm::vec3 temp = pointA - pointB; //glm::vec3 temp = pointA - pointB;
//float distanceSquared = glm::dot(temp, temp); //float distanceSquared = glm::dot(temp, temp);
float distance = glm::distance(pointA, pointB); distance = glm::distance(pointA, pointB);
} }
gettimeofday(&endTime, NULL); gettimeofday(&endTime, NULL);
elapsedMsecs = diffclock(&startTime, &endTime); elapsedMsecs = diffclock(&startTime, &endTime);

View file

@ -336,7 +336,7 @@ void CoverageRegion::erase() {
// _polygons[i]->getBoundingBox().printDebugDetails(); // _polygons[i]->getBoundingBox().printDebugDetails();
//} //}
} }
/**/ **/
// If we're in charge of managing the polygons, then clean them up first // If we're in charge of managing the polygons, then clean them up first
if (_managePolygons) { if (_managePolygons) {
for (int i = 0; i < _polygonCount; i++) { for (int i = 0; i < _polygonCount; i++) {

View file

@ -115,8 +115,8 @@ TagCompound::TagCompound(std::stringstream &ss) :
_width(0), _width(0),
_length(0), _length(0),
_height(0), _height(0),
_blocksId(NULL), _blocksData(NULL),
_blocksData(NULL) _blocksId(NULL)
{ {
int tagId; int tagId;

View file

@ -583,7 +583,7 @@ VoxelProjectedPolygon ViewFrustum::getProjectedPolygon(const AABox& box) const {
lookUp += PROJECTION_CLIPPED; lookUp += PROJECTION_CLIPPED;
} }
/***/ ***/
} }
// set the distance from our camera position, to the closest vertex // set the distance from our camera position, to the closest vertex
float distance = glm::distance(getPosition(), box.getCenter()); float distance = glm::distance(getPosition(), box.getCenter());

View file

@ -995,8 +995,6 @@ void scanTreeWithOcclusion(VoxelTree* tree, ViewFrustum* viewFrustum, CoverageMa
} }
//tree->recurseTreeWithOperationDistanceSorted(scanTreeWithOcclusionOperation, position, (void*)&args); //tree->recurseTreeWithOperationDistanceSorted(scanTreeWithOcclusionOperation, position, (void*)&args);
long long now = usecTimestampNow();
printf("scanTreeWithOcclusion()\n"); printf("scanTreeWithOcclusion()\n");
printf(" position=(%f,%f)\n", position.x, position.y); printf(" position=(%f,%f)\n", position.x, position.y);