Browse Source

Fix for some very picky warnings

pull/6/head
falkTX 8 years ago
parent
commit
277d2de600
6 changed files with 15 additions and 17 deletions
  1. +1
    -1
      dgl/Application.hpp
  2. +2
    -2
      dgl/ImageWidgets.hpp
  3. +3
    -6
      dgl/Makefile.mk
  4. +2
    -2
      dgl/src/Geometry.cpp
  5. +6
    -5
      dgl/src/WidgetPrivateData.hpp
  6. +1
    -1
      distrho/DistrhoUtils.hpp

+ 1
- 1
dgl/Application.hpp View File

@@ -49,7 +49,7 @@ public:
/**
Destructor.
*/
~Application();
virtual ~Application();

/**
Idle function.


+ 2
- 2
dgl/ImageWidgets.hpp View File

@@ -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)
};

// -----------------------------------------------------------------------


+ 3
- 6
dgl/Makefile.mk View File

@@ -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)


+ 2
- 2
dgl/src/Geometry.cpp View File

@@ -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;


+ 6
- 5
dgl/src/WidgetPrivateData.hpp View File

@@ -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()));



+ 1
- 1
distrho/DistrhoUtils.hpp View File

@@ -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);
}

/*


Loading…
Cancel
Save