diff options
author | JP Cimalando <jp-dev@inbox.ru> | 2019-01-09 20:37:20 +0100 |
---|---|---|
committer | Filipe Coelho <falktx@falktx.com> | 2019-01-11 10:29:59 +0100 |
commit | 09d9de8ba9dcf816bc0106a98602649e7151f427 (patch) | |
tree | 329d2709ac85ec370f78bd76a1dd6990660c6e14 /examples | |
parent | 524dcfee15f5256e34205ed707e1d65d5bfa407f (diff) |
Fix a few more warnings
Diffstat (limited to 'examples')
-rw-r--r-- | examples/CairoUI/DemoWidgetClickable.cc | 11 | ||||
-rw-r--r-- | examples/CairoUI/PluginUI.cc | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/examples/CairoUI/DemoWidgetClickable.cc b/examples/CairoUI/DemoWidgetClickable.cc index d37dff71..4af38f95 100644 --- 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 index a4985e8d..8b666f3e 100644 --- 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) { } |