mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-19 19:16:34 +00:00
Doubles down on <cX> over <X.h> for C includes, and usage of the namespace for those types and functions.
This commit is contained in:
+2
-2
@@ -13,7 +13,7 @@ using namespace Inputs;
|
||||
Keyboard::Keyboard() {}
|
||||
|
||||
void Keyboard::set_key_pressed(Key key, bool is_pressed) {
|
||||
size_t key_offset = static_cast<size_t>(key);
|
||||
std::size_t key_offset = static_cast<std::size_t>(key);
|
||||
if(key_offset >= key_states_.size()) {
|
||||
key_states_.resize(key_offset+1, false);
|
||||
}
|
||||
@@ -32,7 +32,7 @@ void Keyboard::set_delegate(Delegate *delegate) {
|
||||
}
|
||||
|
||||
bool Keyboard::get_key_state(Key key) {
|
||||
size_t key_offset = static_cast<size_t>(key);
|
||||
std::size_t key_offset = static_cast<std::size_t>(key);
|
||||
if(key_offset >= key_states_.size()) return false;
|
||||
return key_states_[key_offset];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user