mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:02:55 +02:00
use char when unsigned char is not explicitly required
This commit is contained in:
parent
14b23fc053
commit
3e36ba9265
2 changed files with 12 additions and 8 deletions
|
@ -8,19 +8,20 @@
|
||||||
|
|
||||||
#include "VoxelTree.h"
|
#include "VoxelTree.h"
|
||||||
|
|
||||||
const int MAX_VOXEL_PACKET_SIZE = 1492;
|
const int MAX_TREE_SLICE_BYTES = 26;
|
||||||
const int MAX_TREE_SIZE_BYTES = 26;
|
|
||||||
|
|
||||||
VoxelTree::VoxelTree() {
|
VoxelTree::VoxelTree() {
|
||||||
rootNode = new VoxelNode();
|
rootNode = new VoxelNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char * VoxelTree::loadBitstream(unsigned char * bitstreamBuffer, VoxelNode *bitstreamRootNode, unsigned char ** startSplitPtr) {
|
char * VoxelTree::loadBitstream(char * bitstreamBuffer,
|
||||||
static unsigned char **packetSplitPtr = startSplitPtr;
|
VoxelNode *bitstreamRootNode,
|
||||||
|
char ** startSplitPtr) {
|
||||||
|
static char **packetSplitPtr = startSplitPtr;
|
||||||
|
|
||||||
if (bitstreamRootNode->childMask != 0) {
|
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
|
// we need to add a packet split here
|
||||||
|
|
||||||
// add the octal code for the current root
|
// add the octal code for the current root
|
||||||
|
@ -34,7 +35,7 @@ unsigned char * VoxelTree::loadBitstream(unsigned char * bitstreamBuffer, VoxelN
|
||||||
*(bitstreamBuffer++) = 0;
|
*(bitstreamBuffer++) = 0;
|
||||||
|
|
||||||
// keep a colorPointer so we can check how many colors were added
|
// 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++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
// grab this child
|
// grab this child
|
||||||
|
|
|
@ -12,17 +12,20 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "VoxelNode.h"
|
#include "VoxelNode.h"
|
||||||
|
|
||||||
|
const int MAX_VOXEL_PACKET_SIZE = 1492;
|
||||||
|
|
||||||
class VoxelTree {
|
class VoxelTree {
|
||||||
public:
|
public:
|
||||||
VoxelTree();
|
VoxelTree();
|
||||||
|
|
||||||
VoxelNode *rootNode;
|
VoxelNode *rootNode;
|
||||||
|
|
||||||
|
|
||||||
void addBitstreamPacketMarker();
|
void addBitstreamPacketMarker();
|
||||||
|
|
||||||
void outputDebugInformation(VoxelNode *currentRootNode = NULL);
|
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__) */
|
#endif /* defined(__hifi__VoxelTree__) */
|
||||||
|
|
Loading…
Reference in a new issue