input minor refactoring

This commit is contained in:
ChancellorIkseew
2025-04-09 02:48:09 +10:00
parent 6bdf7c9719
commit a16c4fcf8b
3 changed files with 8 additions and 9 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ static std::unordered_map<int, std::string> keynames {};
static std::unordered_map<int, std::string> buttonsnames{};
std::string input_util::get_name(Mousecode code) {
auto found = buttonsnames.find(static_cast<int>(code));
const auto found = buttonsnames.find(static_cast<int>(code));
if (found == buttonsnames.end()) {
return "unknown";
}
@@ -65,7 +65,7 @@ std::string input_util::get_name(Mousecode code) {
}
std::string input_util::get_name(Keycode code) {
auto found = keynames.find(static_cast<int>(code));
const auto found = keynames.find(static_cast<int>(code));
if (found == keynames.end()) {
return "unknown";
}