linux/macos build bug fix

add const
This commit is contained in:
ChancellorIkseew
2024-10-31 22:11:56 +10:00
parent f489cf6f30
commit 17655eef45
+2 -2
View File
@@ -106,7 +106,7 @@ void Events::pollEvents() {
} }
Binding& Events::getBinding(const std::string& name) { Binding& Events::getBinding(const std::string& name) {
auto found = bindings.find(name); const auto found = bindings.find(name);
if (found == bindings.end()) { if (found == bindings.end()) {
throw std::runtime_error("binding '" + name + "' does not exists"); throw std::runtime_error("binding '" + name + "' does not exists");
} }
@@ -126,7 +126,7 @@ void Events::bind(const std::string& name, inputtype type, int code) {
} }
void Events::rebind(const std::string& name, inputtype type, int code) { void Events::rebind(const std::string& name, inputtype type, int code) {
auto& found = bindings.find(name); const auto& found = bindings.find(name);
if (found == bindings.end()) { if (found == bindings.end()) {
throw std::runtime_error("binding '" + name + "' does not exists"); throw std::runtime_error("binding '" + name + "' does not exists");
} }