DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 277d2de6004b69f81093e099de4948d8e711e55d
parent 1e83d2a9ce94c0612438ec8beefec8c42077d86d
Author: falkTX <falktx@gmail.com>
Date:   Tue,  8 Mar 2016 15:01:50 +0100

Fix for some very picky warnings

Diffstat:
Mdgl/Application.hpp | 2+-
Mdgl/ImageWidgets.hpp | 4++--
Mdgl/Makefile.mk | 9+++------
Mdgl/src/Geometry.cpp | 4++--
Mdgl/src/WidgetPrivateData.hpp | 11++++++-----
Mdistrho/DistrhoUtils.hpp | 2+-
6 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/dgl/Application.hpp b/dgl/Application.hpp @@ -49,7 +49,7 @@ public: /** Destructor. */ - ~Application(); + virtual ~Application(); /** Idle function. diff --git a/dgl/ImageWidgets.hpp b/dgl/ImageWidgets.hpp @@ -79,7 +79,7 @@ private: struct PrivateData; PrivateData* const pData; - DISTRHO_LEAK_DETECTOR(ImageButton) + DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageButton) }; // ----------------------------------------------------------------------- @@ -225,7 +225,7 @@ private: void setAbsolutePos(int, int) const noexcept {} void setAbsolutePos(const Point<int>&) const noexcept {} - DISTRHO_LEAK_DETECTOR(ImageSlider) + DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageSlider) }; // ----------------------------------------------------------------------- diff --git a/dgl/Makefile.mk b/dgl/Makefile.mk @@ -25,11 +25,6 @@ endif BASE_FLAGS = -Wall -Wextra -pipe -MD -MP BASE_OPTS = -O2 -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections -ifneq ($(MACOS_OLD),true) -# Old MacOS doesn't support this -BASE_OPTS += -mfpmath=sse -endif - ifeq ($(MACOS),true) # MacOS linker flags LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs @@ -64,11 +59,13 @@ endif BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 $(CFLAGS) BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++11 $(CXXFLAGS) $(CPPFLAGS) -LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS) ifeq ($(MACOS),true) # 'no-undefined' is always enabled LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS) +else +# Specify 'no-undefined' +LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS) endif ifeq ($(MACOS_OLD),true) diff --git a/dgl/src/Geometry.cpp b/dgl/src/Geometry.cpp @@ -655,13 +655,13 @@ void Circle<T>::_draw(const bool outline) { DISTRHO_SAFE_ASSERT_RETURN(fNumSegments >= 3 && fSize > 0.0f,); - float t, x = fSize, y = 0.0f; + double t, x = fSize, y = 0.0; glBegin(outline ? GL_LINE_LOOP : GL_POLYGON); for (uint i=0; i<fNumSegments; ++i) { - glVertex2f(x + fPos.fX, y + fPos.fY); + glVertex2d(x + fPos.fX, y + fPos.fY); t = x; x = fCos * x - fSin * y; diff --git a/dgl/src/WidgetPrivateData.hpp b/dgl/src/WidgetPrivateData.hpp @@ -44,6 +44,7 @@ struct Widget::PrivateData { parent(p), absolutePos(0, 0), size(0, 0), + subWidgets(), id(0), needsFullViewport(false), needsScaling(false), @@ -81,7 +82,7 @@ struct Widget::PrivateData { { // limit viewport to widget bounds glViewport(absolutePos.getX(), - height - static_cast<int>(self->getHeight()) - absolutePos.getY(), + static_cast<int>(height - self->getHeight()) - absolutePos.getY(), static_cast<GLsizei>(self->getWidth()), static_cast<GLsizei>(self->getHeight())); } @@ -89,13 +90,13 @@ struct Widget::PrivateData { { // only set viewport pos glViewport(absolutePos.getX(), - /*height - static_cast<int>(self->getHeight())*/ - absolutePos.getY(), - static_cast<GLsizei>(width), - static_cast<GLsizei>(height)); + /*static_cast<int>(height - self->getHeight())*/ - absolutePos.getY(), + static_cast<GLsizei>(width), + static_cast<GLsizei>(height)); // then cut the outer bounds glScissor(absolutePos.getX(), - height - static_cast<int>(self->getHeight()) - absolutePos.getY(), + static_cast<int>(height - self->getHeight()) - absolutePos.getY(), static_cast<GLsizei>(self->getWidth()), static_cast<GLsizei>(self->getHeight())); diff --git a/distrho/DistrhoUtils.hpp b/distrho/DistrhoUtils.hpp @@ -68,7 +68,7 @@ int64_t d_cconst(const uint8_t a, const uint8_t b, const uint8_t c, const uint8_ static inline uint32_t d_version(const uint8_t major, const uint8_t minor, const uint8_t micro) noexcept { - return (major << 16) | (minor << 8) | (micro << 0); + return uint32_t(major << 16) | uint32_t(minor << 8) | (micro << 0); } /*