fix a cast, move a packet

This commit is contained in:
Stephen Birarda 2015-07-08 18:37:25 -07:00
parent c5840d085c
commit cf15cbc62f
3 changed files with 11 additions and 11 deletions

View file

@ -2885,7 +2885,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType::Value packetTyp
}
// encode the query data
int packetSize = _octreeQuery.getBroadcastData(queryPacket->getPayload());
int packetSize = _octreeQuery.getBroadcastData(reinterpret_cast<unsigned char*>(queryPacket->getPayload()));
queryPacket->setSizeUsed(packetSize);
// make sure we still have an active socket

View file

@ -866,7 +866,7 @@ int MyAvatar::parseDataAtOffset(const QByteArray& packet, int offset) {
void MyAvatar::sendKillAvatar() {
auto killPacket = NLPacket::create(PacketType::KillAvatar, 0);
DependencyManager::get<NodeList>()->broadcastToNodes(killPacket, NodeSet() << NodeType::AvatarMixer);
DependencyManager::get<NodeList>()->broadcastToNodes(std::move(killPacket), NodeSet() << NodeType::AvatarMixer);
}
void MyAvatar::updateLookAtTargetAvatar() {

View file

@ -61,7 +61,7 @@ void OctreePacketProcessor::processPacket(const SharedNodePointer& sendingNode,
// check version of piggyback packet against expected version
if (packetVersion != expectedVersion) {
static QMultiMap<QUuid, PacketType> versionDebugSuppressMap;
static QMultiMap<QUuid, PacketType::Value> versionDebugSuppressMap;
QUuid senderUUID = uuidFromPacketHeader(packet);
if (!versionDebugSuppressMap.contains(senderUUID, voxelPacketType)) {