Browse Source

Fix a few more warnings

pull/108/head
JP Cimalando Filipe Coelho <falktx@falktx.com> 6 years ago
parent
commit
09d9de8ba9
3 changed files with 8 additions and 9 deletions
  1. +4
    -0
      distrho/src/DistrhoUI.cpp
  2. +3
    -8
      examples/CairoUI/DemoWidgetClickable.cc
  3. +1
    -1
      examples/CairoUI/PluginUI.cc

+ 4
- 0
distrho/src/DistrhoUI.cpp View File

@@ -161,6 +161,10 @@ void UI::uiReshape(uint width, uint height)
glViewport(0, 0, static_cast<GLsizei>(width), static_cast<GLsizei>(height)); glViewport(0, 0, static_cast<GLsizei>(width), static_cast<GLsizei>(height));
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glLoadIdentity(); glLoadIdentity();
#else
// unused
(void)width;
(void)height;
#endif #endif
} }




+ 3
- 8
examples/CairoUI/DemoWidgetClickable.cc View File

@@ -64,17 +64,12 @@ void DemoWidgetClickable::onDisplay()
bool DemoWidgetClickable::onMouse(const MouseEvent &event) bool DemoWidgetClickable::onMouse(const MouseEvent &event)
{ {
if (event.press) { if (event.press) {
Point<int> pos = getAbsolutePos();
Size<uint> size = getSize();

int w = getWidth();
int h = getHeight();
int mx = event.pos.getX(); int mx = event.pos.getX();
int my = event.pos.getY(); 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) { if (inside) {
colorid_ = (colorid_ + 1) % 3; colorid_ = (colorid_ + 1) % 3;
repaint(); repaint();


+ 1
- 1
examples/CairoUI/PluginUI.cc View File

@@ -46,7 +46,7 @@ void ExampleUI::onDisplay()
cairo_paint(cr); cairo_paint(cr);
} }


void ExampleUI::parameterChanged(uint32_t index, float value)
void ExampleUI::parameterChanged(uint32_t, float)
{ {
} }




Loading…
Cancel
Save