Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Philip Rosedale 2013-04-17 17:51:32 -07:00
commit 6ad12e15ed
3 changed files with 2 additions and 3 deletions

View file

@ -25,7 +25,7 @@ int packFloatAngleToTwoByte(unsigned char* buffer, float angle) {
} }
int unpackFloatAngleFromTwoByte(uint16_t* byteAnglePointer, float* destinationPointer) { int unpackFloatAngleFromTwoByte(uint16_t* byteAnglePointer, float* destinationPointer) {
*destinationPointer = (*byteAnglePointer / std::numeric_limits<uint16_t>::max()) * 360.0 - 180; *destinationPointer = (*byteAnglePointer / (float) std::numeric_limits<uint16_t>::max()) * 360.0 - 180;
return sizeof(uint16_t); return sizeof(uint16_t);
} }

View file

@ -71,7 +71,6 @@ Agent::Agent(const Agent &otherAgent) {
} }
Agent& Agent::operator=(Agent otherAgent) { Agent& Agent::operator=(Agent otherAgent) {
std::cout << "Agent swap constructor called on resize?\n";
swap(*this, otherAgent); swap(*this, otherAgent);
return *this; return *this;
} }

View file

@ -107,7 +107,7 @@ void AgentList::processBulkAgentData(sockaddr *senderAddress, unsigned char *pac
bulkSendAgent->setLastRecvTimeUsecs(usecTimestampNow()); bulkSendAgent->setLastRecvTimeUsecs(usecTimestampNow());
} }
unsigned char *startPosition = (unsigned char *)packetData; unsigned char *startPosition = packetData;
unsigned char *currentPosition = startPosition + 1; unsigned char *currentPosition = startPosition + 1;
unsigned char packetHolder[numBytesPerAgent + 1]; unsigned char packetHolder[numBytesPerAgent + 1];