From 3e36ba92655cb34de6bed3bd3bbe98f428c8f3e5 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 15 Mar 2013 12:26:34 -0700 Subject: [PATCH] use char when unsigned char is not explicitly required --- shared/src/VoxelTree.cpp | 13 +++++++------ shared/src/VoxelTree.h | 7 +++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/shared/src/VoxelTree.cpp b/shared/src/VoxelTree.cpp index 994a2869aa..d6d2a6c245 100644 --- a/shared/src/VoxelTree.cpp +++ b/shared/src/VoxelTree.cpp @@ -8,19 +8,20 @@ #include "VoxelTree.h" -const int MAX_VOXEL_PACKET_SIZE = 1492; -const int MAX_TREE_SIZE_BYTES = 26; +const int MAX_TREE_SLICE_BYTES = 26; VoxelTree::VoxelTree() { rootNode = new VoxelNode(); } -unsigned char * VoxelTree::loadBitstream(unsigned char * bitstreamBuffer, VoxelNode *bitstreamRootNode, unsigned char ** startSplitPtr) { - static unsigned char **packetSplitPtr = startSplitPtr; +char * VoxelTree::loadBitstream(char * bitstreamBuffer, + VoxelNode *bitstreamRootNode, + char ** startSplitPtr) { + static char **packetSplitPtr = startSplitPtr; if (bitstreamRootNode->childMask != 0) { - if ((bitstreamBuffer + MAX_TREE_SIZE_BYTES - *packetSplitPtr) > MAX_VOXEL_PACKET_SIZE) { + if ((bitstreamBuffer + MAX_TREE_SLICE_BYTES - *packetSplitPtr) > MAX_VOXEL_PACKET_SIZE) { // we need to add a packet split here // add the octal code for the current root @@ -34,7 +35,7 @@ unsigned char * VoxelTree::loadBitstream(unsigned char * bitstreamBuffer, VoxelN *(bitstreamBuffer++) = 0; // keep a colorPointer so we can check how many colors were added - unsigned char *colorPointer = bitstreamBuffer; + char *colorPointer = bitstreamBuffer; for (int i = 0; i < 8; i++) { // grab this child diff --git a/shared/src/VoxelTree.h b/shared/src/VoxelTree.h index 7f5e66838d..f53ff81f53 100644 --- a/shared/src/VoxelTree.h +++ b/shared/src/VoxelTree.h @@ -12,17 +12,20 @@ #include #include "VoxelNode.h" +const int MAX_VOXEL_PACKET_SIZE = 1492; + class VoxelTree { public: VoxelTree(); VoxelNode *rootNode; - void addBitstreamPacketMarker(); void outputDebugInformation(VoxelNode *currentRootNode = NULL); - unsigned char * loadBitstream(unsigned char * bitstreamBuffer, VoxelNode *bitstreamRootNode, unsigned char ** curPacketSplitPtr = NULL); + char * loadBitstream(char * bitstreamBuffer, + VoxelNode *bitstreamRootNode, + char ** curPacketSplitPtr = NULL); }; #endif /* defined(__hifi__VoxelTree__) */