Browse Source

make gcc happy: unshadow var and includes

pull/2/head
Odilitime 5 years ago
parent
commit
f5dbe1fd81
  1. 12
      src/graphics/opengl/Window.cpp
  2. 1
      src/scheduler.cpp
  3. 1
      src/scheduler.h

12
src/graphics/opengl/Window.cpp

@ -434,16 +434,16 @@ bool Window::initGLFW() { @@ -434,16 +434,16 @@ bool Window::initGLFW() {
//std::cout << "glfwSetKeyCallback" << std::endl;
if (thiz->focusedComponent) {
//std::cout << "glfwSetKeyCallback - focused on " << typeOfComponent(thiz->focusedComponent) << std::endl;
TabbedComponent *tabComponent = dynamic_cast<TabbedComponent*>(thiz->focusedComponent.get());
if (tabComponent) {
TabbedComponent *p_tabComponent = dynamic_cast<TabbedComponent*>(thiz->focusedComponent.get());
if (p_tabComponent) {
// repeat or key up
if (action == 2 || action == 0) {
if (tabComponent->onKeyPress) {
tabComponent->onKeyPress(key, scancode, action, mods);
if (p_tabComponent->onKeyPress) {
p_tabComponent->onKeyPress(key, scancode, action, mods);
}
if (action == 0) {
if (tabComponent->onKeyup) {
tabComponent->onKeyup(key, scancode, action, mods);
if (p_tabComponent->onKeyup) {
p_tabComponent->onKeyup(key, scancode, action, mods);
}
}
}

1
src/scheduler.cpp

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
#include "scheduler.h"
#include <GLFW/glfw3.h>
#include <iostream>
#include <algorithm>
std::shared_ptr<timer_handle> Scheduler::setTimeout(std::function<void()> callback, unsigned long delay) {
double now = glfwGetTime() * 1000;

1
src/scheduler.h

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
#include <memory>
#include <vector>
#include <functional>
#include <limits.h>
class timer_handle {
public:

Loading…
Cancel
Save