Fix warning

This commit is contained in:
Clement 2018-05-01 19:11:00 -07:00
parent d87cd2af6e
commit 487a63025f
5 changed files with 6 additions and 6 deletions

View file

@ -126,7 +126,7 @@ void AvatarMixerClientData::removeFromRadiusIgnoringSet(SharedNodePointer self,
}
}
void AvatarMixerClientData::readViewFrustumPacket(QByteArray message) {
void AvatarMixerClientData::readViewFrustumPacket(const QByteArray& message) {
_currentViewFrustums.clear();
auto sourceBuffer = reinterpret_cast<const unsigned char*>(message.constData());

View file

@ -98,7 +98,7 @@ public:
void removeFromRadiusIgnoringSet(SharedNodePointer self, const QUuid& other);
void ignoreOther(SharedNodePointer self, SharedNodePointer other);
void readViewFrustumPacket(QByteArray message);
void readViewFrustumPacket(const QByteArray& message);
bool otherAvatarInView(const AABox& otherAvatarBox);

View file

@ -5862,7 +5862,7 @@ void Application::queryAvatars() {
auto destinationBuffer = reinterpret_cast<unsigned char*>(avatarPacket->getPayload());
unsigned char* bufferStart = destinationBuffer;
uint8_t numFrustums = _conicalViews.size();
uint8_t numFrustums = (uint8_t)_conicalViews.size();
memcpy(destinationBuffer, &numFrustums, sizeof(numFrustums));
destinationBuffer += sizeof(numFrustums);

View file

@ -35,7 +35,7 @@ int OctreeQuery::getBroadcastData(unsigned char* destinationBuffer) {
destinationBuffer += sizeof(_connectionID);
// Number of frustums
uint8_t numFrustums = _conicalViews.size();
uint8_t numFrustums = (uint8_t)_conicalViews.size();
memcpy(destinationBuffer, &numFrustums, sizeof(numFrustums));
destinationBuffer += sizeof(numFrustums);

View file

@ -443,8 +443,7 @@ protected:
}
const ConicalViewFrustums& getConicalViews() const override {
assert(false);
return ConicalViewFrustums();
return _view;
}
QThread* getMainThread() override {
@ -1122,6 +1121,7 @@ private:
graphics::LightPointer _globalLight { std::make_shared<graphics::Light>() };
bool _ready { false };
EntitySimulationPointer _entitySimulation;
ConicalViewFrustums _view;
QStringList _commands;
QString _commandPath;