From c316899f27164fe45e40b4ffd20e4929b617c712 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Tue, 21 May 2013 17:42:55 -0700 Subject: [PATCH] CR feedback --- libraries/voxels/src/VoxelTree.cpp | 2 +- voxel-server/src/main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/voxels/src/VoxelTree.cpp b/libraries/voxels/src/VoxelTree.cpp index 4922a22f5a..31d68ecc45 100644 --- a/libraries/voxels/src/VoxelTree.cpp +++ b/libraries/voxels/src/VoxelTree.cpp @@ -268,7 +268,7 @@ void VoxelTree::deleteVoxelCodeFromTree(unsigned char* codeBuffer, bool stage) { int lengthInBytes = bytesRequiredForCodeLength(*codeBuffer); // includes octet count, not color! // if the code we got back matches our target, then we know we can actually delete it - if (0 == memcmp(nodeToDelete->getOctalCode(), codeBuffer, lengthInBytes)) { + if (memcmp(nodeToDelete->getOctalCode(), codeBuffer, lengthInBytes) == 0) { if (parentNode) { int childIndex = branchIndexWithDescendant(parentNode->getOctalCode(), codeBuffer); if (stage) { diff --git a/voxel-server/src/main.cpp b/voxel-server/src/main.cpp index e4fa76dc60..c258ad052c 100644 --- a/voxel-server/src/main.cpp +++ b/voxel-server/src/main.cpp @@ -167,7 +167,7 @@ void resInVoxelDistributor(AgentList* agentList, bytesWritten = randomTree.encodeTreeBitstream(agentData->getMaxSearchLevel(), subTree, &tempOutputBuffer[0], MAX_VOXEL_PACKET_SIZE - 1, agentData->nodeBag, &viewFrustum, - agentData->getWantColor(),WANT_EXISTS_BITS); + agentData->getWantColor(), WANT_EXISTS_BITS); if (agentData->getAvailable() >= bytesWritten) { agentData->writeToPacket(&tempOutputBuffer[0], bytesWritten); @@ -604,7 +604,7 @@ int main(int argc, const char * argv[]) if (packetData[0] == PACKET_HEADER_ERASE_VOXEL) { // Send these bits off to the VoxelTree class to process them - printf("got Erase Voxels message, have voxel tree do the work... randomTree.processRemoveVoxelBitstream()\n"); + //printf("got Erase Voxels message, have voxel tree do the work... randomTree.processRemoveVoxelBitstream()\n"); randomTree.processRemoveVoxelBitstream((unsigned char*)packetData,receivedBytes); } if (packetData[0] == PACKET_HEADER_Z_COMMAND) {