quick check with linters
This commit is contained in:
@@ -98,19 +98,19 @@ void Events::pollEvents() {
|
||||
}
|
||||
}
|
||||
|
||||
void Events::bind(std::string name, inputtype type, keycode code) {
|
||||
void Events::bind(const std::string& name, inputtype type, keycode code) {
|
||||
bind(name, type, static_cast<int>(code));
|
||||
}
|
||||
|
||||
void Events::bind(std::string name, inputtype type, mousecode code) {
|
||||
void Events::bind(const std::string& name, inputtype type, mousecode code) {
|
||||
bind(name, type, static_cast<int>(code));
|
||||
}
|
||||
|
||||
void Events::bind(std::string name, inputtype type, int code) {
|
||||
void Events::bind(const std::string& name, inputtype type, int code) {
|
||||
bindings[name] = Binding(type, code);
|
||||
}
|
||||
|
||||
bool Events::active(std::string name) {
|
||||
bool Events::active(const std::string& name) {
|
||||
const auto& found = bindings.find(name);
|
||||
if (found == bindings.end()) {
|
||||
return false;
|
||||
@@ -118,7 +118,7 @@ bool Events::active(std::string name) {
|
||||
return found->second.active();
|
||||
}
|
||||
|
||||
bool Events::jactive(std::string name) {
|
||||
bool Events::jactive(const std::string& name) {
|
||||
const auto& found = bindings.find(name);
|
||||
if (found == bindings.end()) {
|
||||
return false;
|
||||
|
||||
@@ -38,11 +38,11 @@ public:
|
||||
|
||||
static void toggleCursor();
|
||||
|
||||
static void bind(std::string name, inputtype type, keycode code);
|
||||
static void bind(std::string name, inputtype type, mousecode code);
|
||||
static void bind(std::string name, inputtype type, int code);
|
||||
static bool active(std::string name);
|
||||
static bool jactive(std::string name);
|
||||
static void bind(const std::string& name, inputtype type, keycode code);
|
||||
static void bind(const std::string& name, inputtype type, mousecode code);
|
||||
static void bind(const std::string& name, inputtype type, int code);
|
||||
static bool active(const std::string& name);
|
||||
static bool jactive(const std::string& name);
|
||||
|
||||
static void setKey(int key, bool b);
|
||||
static void setButton(int button, bool b);
|
||||
|
||||
@@ -32,7 +32,7 @@ void mouse_button_callback(GLFWwindow*, int button, int action, int) {
|
||||
Events::setButton(button, action == GLFW_PRESS);
|
||||
}
|
||||
|
||||
void key_callback(GLFWwindow*, int key, int scancode, int action, int /*mode*/) {
|
||||
void key_callback(GLFWwindow*, int key, int /*scancode*/, int action, int /*mode*/) {
|
||||
if (key == GLFW_KEY_UNKNOWN) return;
|
||||
if (action == GLFW_PRESS) {
|
||||
Events::setKey(key, true);
|
||||
@@ -79,7 +79,7 @@ void window_size_callback(GLFWwindow*, int width, int height) {
|
||||
Window::resetScissor();
|
||||
}
|
||||
|
||||
void character_callback(GLFWwindow* window, unsigned int codepoint){
|
||||
void character_callback(GLFWwindow*, unsigned int codepoint){
|
||||
Events::codepoints.push_back(codepoint);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user