From 166ad4f73d4ac5857c33bb444fd9d7db1ed6c057 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Tue, 21 May 2013 17:37:21 -0700 Subject: [PATCH] CR feedback --- libraries/voxels/src/VoxelNode.cpp | 4 ++-- libraries/voxels/src/VoxelTree.cpp | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/libraries/voxels/src/VoxelNode.cpp b/libraries/voxels/src/VoxelNode.cpp index 9fe1de2af4..5125e2d574 100644 --- a/libraries/voxels/src/VoxelNode.cpp +++ b/libraries/voxels/src/VoxelNode.cpp @@ -279,9 +279,9 @@ void VoxelNode::printDebugDetails(const char* label) const { printLog("%s - Voxel at corner=(%f,%f,%f) size=%f\n isLeaf=%s isColored=%s isDirty=%s shouldRender=%s\n children=", label, _box.getCorner().x, _box.getCorner().y, _box.getCorner().z, _box.getSize().x, debug::valueOf(isLeaf()), debug::valueOf(isColored()), debug::valueOf(isDirty()), - debug::valueOf(getShouldRender()) ); + debug::valueOf(getShouldRender())); - outputBits(childBits,false); + outputBits(childBits, false); printLog("\n octalCode="); printOctalCode(_octalCode); } diff --git a/libraries/voxels/src/VoxelTree.cpp b/libraries/voxels/src/VoxelTree.cpp index c340b40572..4922a22f5a 100644 --- a/libraries/voxels/src/VoxelTree.cpp +++ b/libraries/voxels/src/VoxelTree.cpp @@ -165,7 +165,7 @@ int VoxelTree::readNodeData(VoxelNode* destinationNode, unsigned char* nodeData, // give this destination node the child mask from the packet unsigned char childrenInTreeMask = includeExistsBits ? *(nodeData + bytesRead) : ALL_CHILDREN_ASSUMED_TO_EXIST; - unsigned char childMask = *(nodeData + bytesRead + (includeExistsBits ? sizeof(childrenInTreeMask) : 0) ); + unsigned char childMask = *(nodeData + bytesRead + (includeExistsBits ? sizeof(childrenInTreeMask) : 0)); int childIndex = 0; bytesRead += includeExistsBits ? sizeof(childrenInTreeMask) + sizeof(childMask) : sizeof(childMask); @@ -354,17 +354,12 @@ void VoxelTree::readCodeColorBufferToTree(unsigned char *codeColorBuffer, bool d void VoxelTree::processRemoveVoxelBitstream(unsigned char * bitstream, int bufferSizeBytes) { // XXXBHG: validate buffer is at least 4 bytes long? other guards?? unsigned short int itemNumber = (*((unsigned short int*)&bitstream[1])); - printLog("processRemoveVoxelBitstream() receivedBytes=%d itemNumber=%d\n",bufferSizeBytes,itemNumber); int atByte = 3; unsigned char* pVoxelData = (unsigned char*)&bitstream[3]; while (atByte < bufferSizeBytes) { unsigned char octets = (unsigned char)*pVoxelData; int voxelDataSize = bytesRequiredForCodeLength(octets)+3; // 3 for color! - float* vertices = firstVertexForCode(pVoxelData); - printLog("deleting voxel at: %f,%f,%f\n",vertices[0],vertices[1],vertices[2]); - delete []vertices; - deleteVoxelCodeFromTree(pVoxelData); pVoxelData+=voxelDataSize;