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:
+4
-4
@@ -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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user