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

Cleans up all redundant lock/unique_guard declarations.

This commit is contained in:
Thomas Harte
2020-06-15 00:24:10 -04:00
parent 902b33d25d
commit 495024d6fe
18 changed files with 61 additions and 62 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ void IntelligentKeyboard::run_for(HalfCycles duration) {
// Forward key changes; implicit assumption here: mutexs are cheap while there's
// negligible contention.
{
std::lock_guard<decltype(key_queue_mutex_)> guard(key_queue_mutex_);
std::lock_guard guard(key_queue_mutex_);
for(uint8_t key: key_queue_) {
output_bytes({key});
}
@@ -348,7 +348,7 @@ void IntelligentKeyboard::post_relative_mouse_event(int x, int y) {
// MARK: - Keyboard Input
void IntelligentKeyboard::set_key_state(Key key, bool is_pressed) {
std::lock_guard<decltype(key_queue_mutex_)> guard(key_queue_mutex_);
std::lock_guard guard(key_queue_mutex_);
if(is_pressed) {
key_queue_.push_back(uint8_t(key));
} else {