code cleanup

This commit is contained in:
ZappoMan 2013-05-21 11:33:32 -07:00
parent a7f0a66aee
commit 3220f986d6

View file

@ -59,7 +59,7 @@ AvatarData::AvatarData() :
_wantColor(true), _wantColor(true),
_wantDelta(false) _wantDelta(false)
{ {
}; }
int AvatarData::getBroadcastData(unsigned char* destinationBuffer) { int AvatarData::getBroadcastData(unsigned char* destinationBuffer) {
unsigned char* bufferStart = destinationBuffer; unsigned char* bufferStart = destinationBuffer;
@ -133,9 +133,9 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) {
// voxel sending features... // voxel sending features...
// voxel sending features... // voxel sending features...
unsigned char wantItems = 0; unsigned char wantItems = 0;
if (_wantResIn) { setAtBit(wantItems,WANT_RESIN_AT_BIT); } if (_wantResIn) { setAtBit(wantItems,WANT_RESIN_AT_BIT); }
if (_wantColor) { setAtBit(wantItems,WANT_COLOR_AT_BIT); } if (_wantColor) { setAtBit(wantItems,WANT_COLOR_AT_BIT); }
if (_wantDelta) { setAtBit(wantItems,WANT_DELTA_AT_BIT); } if (_wantDelta) { setAtBit(wantItems,WANT_DELTA_AT_BIT); }
*destinationBuffer++ = wantItems; *destinationBuffer++ = wantItems;
return destinationBuffer - bufferStart; return destinationBuffer - bufferStart;
@ -219,9 +219,9 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
// voxel sending features... // voxel sending features...
unsigned char wantItems = 0; unsigned char wantItems = 0;
wantItems = (unsigned char)*sourceBuffer++; wantItems = (unsigned char)*sourceBuffer++;
_wantResIn = oneAtBit(wantItems,WANT_RESIN_AT_BIT); _wantResIn = oneAtBit(wantItems,WANT_RESIN_AT_BIT);
_wantColor = oneAtBit(wantItems,WANT_COLOR_AT_BIT); _wantColor = oneAtBit(wantItems,WANT_COLOR_AT_BIT);
_wantDelta = oneAtBit(wantItems,WANT_DELTA_AT_BIT); _wantDelta = oneAtBit(wantItems,WANT_DELTA_AT_BIT);
return sourceBuffer - startPosition; return sourceBuffer - startPosition;
} }