fixed signed/unsigned comparison and unused variable

This commit is contained in:
Andrew Meadows 2014-09-05 16:41:01 -07:00
parent 0ddc8eb448
commit 62438bae6a

View file

@ -242,7 +242,7 @@ int Octree::readElementData(OctreeElement* destinationElement, const unsigned ch
// give this destination element the child mask from the packet // give this destination element the child mask from the packet
const unsigned char ALL_CHILDREN_ASSUMED_TO_EXIST = 0xFF; const unsigned char ALL_CHILDREN_ASSUMED_TO_EXIST = 0xFF;
if (bytesLeftToRead < sizeof(unsigned char)) { if ((size_t)bytesLeftToRead < sizeof(unsigned char)) {
qDebug() << "UNEXPECTED: readElementData() only had " << bytesLeftToRead << " bytes. Not enough for meaningful data."; qDebug() << "UNEXPECTED: readElementData() only had " << bytesLeftToRead << " bytes. Not enough for meaningful data.";
return bytesAvailable; // assume we read the entire buffer... return bytesAvailable; // assume we read the entire buffer...
} }
@ -1865,7 +1865,6 @@ int Octree::encodeTreeBitstreamRecursion(OctreeElement* element,
bool Octree::readFromSVOFile(const char* fileName) { bool Octree::readFromSVOFile(const char* fileName) {
bool fileOk = false; bool fileOk = false;
bool hasBufferBreaks = false;
PacketVersion gotVersion = 0; PacketVersion gotVersion = 0;
std::ifstream file(fileName, std::ios::in|std::ios::binary|std::ios::ate); std::ifstream file(fileName, std::ios::in|std::ios::binary|std::ios::ate);