DPF

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

commit 09d9de8ba9dcf816bc0106a98602649e7151f427
parent 524dcfee15f5256e34205ed707e1d65d5bfa407f
Author: JP Cimalando <jp-dev@inbox.ru>
Date:   Wed,  9 Jan 2019 20:36:53 +0100

Fix a few more warnings

Diffstat:
Mdistrho/src/DistrhoUI.cpp | 4++++
Mexamples/CairoUI/DemoWidgetClickable.cc | 11+++--------
Mexamples/CairoUI/PluginUI.cc | 2+-
3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp @@ -161,6 +161,10 @@ void UI::uiReshape(uint width, uint height) glViewport(0, 0, static_cast<GLsizei>(width), static_cast<GLsizei>(height)); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); +#else + // unused + (void)width; + (void)height; #endif } diff --git a/examples/CairoUI/DemoWidgetClickable.cc b/examples/CairoUI/DemoWidgetClickable.cc @@ -64,17 +64,12 @@ void DemoWidgetClickable::onDisplay() bool DemoWidgetClickable::onMouse(const MouseEvent &event) { if (event.press) { - Point<int> pos = getAbsolutePos(); - Size<uint> size = getSize(); - + int w = getWidth(); + int h = getHeight(); int mx = event.pos.getX(); int my = event.pos.getY(); - int px = pos.getX(); - int py = pos.getY(); - - bool inside = mx >= 0 && my >= 0 && - mx < size.getWidth() && my < size.getHeight(); + bool inside = mx >= 0 && my >= 0 && mx < w && my < h; if (inside) { colorid_ = (colorid_ + 1) % 3; repaint(); diff --git a/examples/CairoUI/PluginUI.cc b/examples/CairoUI/PluginUI.cc @@ -46,7 +46,7 @@ void ExampleUI::onDisplay() cairo_paint(cr); } -void ExampleUI::parameterChanged(uint32_t index, float value) +void ExampleUI::parameterChanged(uint32_t, float) { }