Merge pull request #6540 from Atlante45/warnings

Fix warnings on OS X
This commit is contained in:
Brad Hefta-Gaub 2015-12-04 10:19:25 -08:00
commit 49a7852d76
15 changed files with 71 additions and 75 deletions

View file

@ -50,10 +50,10 @@ public:
virtual void entityCreated(const EntityItem& newEntity, const SharedNodePointer& senderNode) override; virtual void entityCreated(const EntityItem& newEntity, const SharedNodePointer& senderNode) override;
virtual void readAdditionalConfiguration(const QJsonObject& settingsSectionObject) override; virtual void readAdditionalConfiguration(const QJsonObject& settingsSectionObject) override;
virtual QString serverSubclassStats(); virtual QString serverSubclassStats() override;
virtual void trackSend(const QUuid& dataID, quint64 dataLastEdited, const QUuid& viewerNode); virtual void trackSend(const QUuid& dataID, quint64 dataLastEdited, const QUuid& viewerNode) override;
virtual void trackViewerGone(const QUuid& viewerNode); virtual void trackViewerGone(const QUuid& viewerNode) override;
public slots: public slots:
void pruneDeletedEntities(); void pruneDeletedEntities();

View file

@ -533,15 +533,13 @@ bool Overlays::isLoaded(unsigned int id) {
QSizeF Overlays::textSize(unsigned int id, const QString& text) const { QSizeF Overlays::textSize(unsigned int id, const QString& text) const {
Overlay::Pointer thisOverlay = _overlaysHUD[id]; Overlay::Pointer thisOverlay = _overlaysHUD[id];
if (thisOverlay) { if (thisOverlay) {
if (typeid(*thisOverlay) == typeid(TextOverlay)) { if (auto textOverlay = std::dynamic_pointer_cast<TextOverlay>(thisOverlay)) {
return std::dynamic_pointer_cast<TextOverlay>(thisOverlay)->textSize(text); return textOverlay->textSize(text);
} }
} else { } else {
thisOverlay = _overlaysWorld[id]; thisOverlay = _overlaysWorld[id];
if (thisOverlay) { if (auto text3dOverlay = std::dynamic_pointer_cast<Text3DOverlay>(thisOverlay)) {
if (typeid(*thisOverlay) == typeid(Text3DOverlay)) { return text3dOverlay->textSize(text);
return std::dynamic_pointer_cast<Text3DOverlay>(thisOverlay)->textSize(text);
}
} }
} }
return QSizeF(0.0f, 0.0f); return QSizeF(0.0f, 0.0f);

View file

@ -1324,64 +1324,64 @@ static int scaleDelay(float delay, float sampleRate) {
// input clamped to [0.0f, 100.0f] // input clamped to [0.0f, 100.0f]
// //
static const float earlyMix0Table[][2] = { static const float earlyMix0Table[][2] = {
0.0000f, 0.6000f, {0.0000f, 0.6000f},
63.3333f, 0.0800f, {63.3333f, 0.0800f},
83.3333f, 0.0200f, {83.3333f, 0.0200f},
93.3333f, 0.0048f, {93.3333f, 0.0048f},
100.0000f, 0.0048f, {100.0000f, 0.0048f},
}; };
static const float earlyMix1Table[][2] = { static const float earlyMix1Table[][2] = {
0.0000f, 0.3360f, {0.0000f, 0.3360f},
20.0000f, 0.6000f, {20.0000f, 0.6000f},
100.0000f, 0.0240f, {100.0000f, 0.0240f},
}; };
static const float earlyMix2Table[][2] = { static const float earlyMix2Table[][2] = {
0.0000f, 0.0480f, {0.0000f, 0.0480f},
13.3333f, 0.0960f, {13.3333f, 0.0960f},
53.3333f, 0.9600f, {53.3333f, 0.9600f},
100.0000f, 0.1200f, {100.0000f, 0.1200f},
}; };
static const float lateMix0Table[][2] = { static const float lateMix0Table[][2] = {
0.0000f, 0.1250f, {0.0000f, 0.1250f},
13.3333f, 0.1875f, {13.3333f, 0.1875f},
66.6666f, 0.7500f, {66.6666f, 0.7500f},
100.0000f, 0.8750f, {100.0000f, 0.8750f},
}; };
static const float lateMix1Table[][2] = { static const float lateMix1Table[][2] = {
0.0000f, 0.9990f, {0.0000f, 0.9990f},
33.3333f, 0.5000f, {33.3333f, 0.5000f},
66.6666f, 0.9990f, {66.6666f, 0.9990f},
93.3333f, 0.6000f, {93.3333f, 0.6000f},
100.0000f, 0.6000f, {100.0000f, 0.6000f},
}; };
static const float lateMix2Table[][2] = { static const float lateMix2Table[][2] = {
0.0000f, 0.9990f, {0.0000f, 0.9990f},
33.3333f, 0.9990f, {33.3333f, 0.9990f},
63.3333f, 0.4500f, {63.3333f, 0.4500f},
100.0000f, 0.9990f, {100.0000f, 0.9990f},
}; };
static const float diffusionCoefTable[][2] = { static const float diffusionCoefTable[][2] = {
0.0000f, 0.0000f, {0.0000f, 0.0000f},
20.0000f, 0.0470f, {20.0000f, 0.0470f},
33.3333f, 0.0938f, {33.3333f, 0.0938f},
46.6666f, 0.1563f, {46.6666f, 0.1563f},
60.0000f, 0.2344f, {60.0000f, 0.2344f},
73.3333f, 0.3125f, {73.3333f, 0.3125f},
93.3333f, 0.5000f, {93.3333f, 0.5000f},
100.0000f, PHI, {100.0000f, PHI},
}; };
static const float roomSizeTable[][2] = { static const float roomSizeTable[][2] = {
0.0000f, 0.1500f, {0.0000f, 0.1500f},
25.0000f, 0.3000f, {25.0000f, 0.3000f},
50.0000f, 0.5000f, {50.0000f, 0.5000f},
100.0000f, 1.0000f, {100.0000f, 1.0000f},
}; };
static float interpolateTable(const float table[][2], float x) { static float interpolateTable(const float table[][2], float x) {

View file

@ -23,10 +23,10 @@ class ActionEndpoint : public Endpoint {
public: public:
ActionEndpoint(const Input& id = Input::INVALID_INPUT) : Endpoint(id) { } ActionEndpoint(const Input& id = Input::INVALID_INPUT) : Endpoint(id) { }
virtual float peek() const { return _currentValue; } virtual float peek() const override { return _currentValue; }
virtual void apply(float newValue, const Pointer& source) override; virtual void apply(float newValue, const Pointer& source) override;
virtual Pose peekPose() const { return _currentPose; } virtual Pose peekPose() const override { return _currentPose; }
virtual void apply(const Pose& value, const Pointer& source) override; virtual void apply(const Pose& value, const Pointer& source) override;
virtual void reset() override; virtual void reset() override;

View file

@ -28,9 +28,9 @@ public:
virtual Pose pose() override; virtual Pose pose() override;
virtual void apply(const Pose& value, const Pointer& source) override { } virtual void apply(const Pose& value, const Pointer& source) override { }
virtual bool writeable() const { return false; } virtual bool writeable() const override { return false; }
virtual bool readable() const { return !_read; } virtual bool readable() const override { return !_read; }
virtual void reset() { _read = false; } virtual void reset() override { _read = false; }
private: private:
bool _read { false }; bool _read { false };

View file

@ -23,7 +23,7 @@ public:
virtual float apply(float value) const override; virtual float apply(float value) const override;
virtual bool parseParameters(const QJsonValue& parameters); virtual bool parseParameters(const QJsonValue& parameters) override;
private: private:
static const float DEFAULT_LAST_EMIT_TIME; static const float DEFAULT_LAST_EMIT_TIME;

View file

@ -23,7 +23,7 @@ public:
virtual float apply(float value) const override { virtual float apply(float value) const override {
return value * _scale; return value * _scale;
} }
virtual bool parseParameters(const QJsonValue& parameters); virtual bool parseParameters(const QJsonValue& parameters) override;
private: private:
float _scale = 1.0f; float _scale = 1.0f;

View file

@ -6,7 +6,6 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
#include "OpenGLDisplayPlugin.h" #include "OpenGLDisplayPlugin.h"
#include <QOpenGLContext>
#include <QCoreApplication> #include <QCoreApplication>
#include <gl/Config.h> #include <gl/Config.h>

View file

@ -8,7 +8,6 @@
#include "WindowOpenGLDisplayPlugin.h" #include "WindowOpenGLDisplayPlugin.h"
#include <QGLWidget> #include <QGLWidget>
#include <QOpenGLContext>
#include "plugins/PluginContainer.h" #include "plugins/PluginContainer.h"

View file

@ -30,42 +30,42 @@ public:
virtual void setDimensions(const glm::vec3& value) override; virtual void setDimensions(const glm::vec3& value) override;
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const; virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
virtual bool setProperties(const EntityItemProperties& properties); virtual bool setProperties(const EntityItemProperties& properties) override;
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead, virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
ReadBitstreamToTreeParams& args, ReadBitstreamToTreeParams& args,
EntityPropertyFlags& propertyFlags, bool overwriteLocalData, EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
bool& somethingChanged); bool& somethingChanged) override;
virtual void somethingChangedNotification() { virtual void somethingChangedNotification() override {
// FIX ME: this is overly aggressive. We only really need to simulate() if something about // FIX ME: this is overly aggressive. We only really need to simulate() if something about
// the world space transform has changed and/or if some animation is occurring. // the world space transform has changed and/or if some animation is occurring.
_needsInitialSimulation = true; _needsInitialSimulation = true;
} }
virtual bool readyToAddToScene(RenderArgs* renderArgs = nullptr); virtual bool readyToAddToScene(RenderArgs* renderArgs = nullptr);
virtual bool addToScene(EntityItemPointer self, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges); virtual bool addToScene(EntityItemPointer self, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges) override;
virtual void removeFromScene(EntityItemPointer self, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges); virtual void removeFromScene(EntityItemPointer self, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges) override;
virtual void render(RenderArgs* args); virtual void render(RenderArgs* args) override;
virtual bool supportsDetailedRayIntersection() const { return true; } virtual bool supportsDetailedRayIntersection() const override { return true; }
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction, virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
bool& keepSearching, OctreeElementPointer& element, float& distance, bool& keepSearching, OctreeElementPointer& element, float& distance,
BoxFace& face, glm::vec3& surfaceNormal, BoxFace& face, glm::vec3& surfaceNormal,
void** intersectedObject, bool precisionPicking) const; void** intersectedObject, bool precisionPicking) const override;
Model* getModel(EntityTreeRenderer* renderer); Model* getModel(EntityTreeRenderer* renderer);
virtual bool needsToCallUpdate() const; virtual bool needsToCallUpdate() const override;
virtual void update(const quint64& now); virtual void update(const quint64& now) override;
virtual void setCompoundShapeURL(const QString& url); virtual void setCompoundShapeURL(const QString& url) override;
bool isReadyToComputeShape(); virtual bool isReadyToComputeShape() override;
void computeShapeInfo(ShapeInfo& info); virtual void computeShapeInfo(ShapeInfo& info) override;
virtual bool contains(const glm::vec3& point) const; virtual bool contains(const glm::vec3& point) const override;
private: private:
void remapTextures(); void remapTextures();

View file

@ -11,6 +11,8 @@
#ifndef hifi_gpu_GLBackend_Shared_h #ifndef hifi_gpu_GLBackend_Shared_h
#define hifi_gpu_GLBackend_Shared_h #define hifi_gpu_GLBackend_Shared_h
#include <gl/Config.h>
#include <QDebug> #include <QDebug>
#include "GPULogging.h" #include "GPULogging.h"

View file

@ -32,7 +32,7 @@ public:
return _frames.size(); return _frames.size();
} }
Clip::Pointer duplicate() const { virtual Clip::Pointer duplicate() const override {
auto result = newClip(); auto result = newClip();
Locker lock(_mutex); Locker lock(_mutex);
for (size_t i = 0; i < _frames.size(); ++i) { for (size_t i = 0; i < _frames.size(); ++i) {
@ -41,7 +41,7 @@ public:
return result; return result;
} }
virtual void seekFrameTime(Frame::Time offset) { virtual void seekFrameTime(Frame::Time offset) override {
Locker lock(_mutex); Locker lock(_mutex);
auto itr = std::lower_bound(_frames.begin(), _frames.end(), offset, auto itr = std::lower_bound(_frames.begin(), _frames.end(), offset,
[](const T& a, Frame::Time b)->bool { [](const T& a, Frame::Time b)->bool {

View file

@ -45,7 +45,7 @@ public:
// FIXME move to frame? // FIXME move to frame?
static const qint64 MINIMUM_FRAME_SIZE = sizeof(FrameType) + sizeof(Frame::Time) + sizeof(FrameSize); static const qint64 MINIMUM_FRAME_SIZE = sizeof(FrameType) + sizeof(Frame::Time) + sizeof(FrameSize);
protected: protected:
void reset(); void reset() override;
virtual FrameConstPointer readFrame(size_t index) const override; virtual FrameConstPointer readFrame(size_t index) const override;
QJsonDocument _header; QJsonDocument _header;
uchar* _data { nullptr }; uchar* _data { nullptr };

View file

@ -12,7 +12,6 @@
#ifndef hifi_FboCache_h #ifndef hifi_FboCache_h
#define hifi_FboCache_h #define hifi_FboCache_h
#include <QOpenGLContext>
#include <QOffscreenSurface> #include <QOffscreenSurface>
#include <QQueue> #include <QQueue>
#include <QMap> #include <QMap>

View file

@ -14,7 +14,6 @@
#include <GLMHelpers.h> #include <GLMHelpers.h>
#include <QEvent> #include <QEvent>
#include <QtGui/QResizeEvent> #include <QtGui/QResizeEvent>
#include <QtGui/QOpenGLContext>
#include <QtGui/QGuiApplication> #include <QtGui/QGuiApplication>
#include <QtGui/QScreen> #include <QtGui/QScreen>