1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-19 19:16:34 +00:00

Increases const correctness, marks some additional constructors as constexpr, switches std::atomic construction style.

This commit is contained in:
Thomas Harte
2020-05-20 23:34:26 -04:00
parent 41fc6c20a0
commit 512a52e88d
59 changed files with 136 additions and 140 deletions
+4 -4
View File
@@ -30,7 +30,7 @@ bool Keyboard::set_key_pressed(Key key, char value, bool is_pressed) {
return false;
}
const std::set<Inputs::Keyboard::Key> &Keyboard::get_essential_modifiers() {
const std::set<Inputs::Keyboard::Key> &Keyboard::get_essential_modifiers() const {
return essential_modifiers_;
}
@@ -43,16 +43,16 @@ void Keyboard::set_delegate(Delegate *delegate) {
delegate_ = delegate;
}
bool Keyboard::get_key_state(Key key) {
bool Keyboard::get_key_state(Key key) const {
const size_t key_offset = size_t(key);
if(key_offset >= key_states_.size()) return false;
return key_states_[key_offset];
}
const std::set<Keyboard::Key> &Keyboard::observed_keys() {
const std::set<Keyboard::Key> &Keyboard::observed_keys() const {
return observed_keys_;
}
bool Keyboard::is_exclusive() {
bool Keyboard::is_exclusive() const {
return is_exclusive_;
}