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