From 07213d9f7eef01039bf49e8b8d85533a6f5d1ac8 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 30 Jun 2020 12:47:28 -0700 Subject: [PATCH] Clarity improvement to Keyboardio Atreus init. By removing the namespace declaration for the 'using' alias directives, what's going on will hopefully be a little clearer --- src/kaleidoscope/device/keyboardio/Atreus2.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/kaleidoscope/device/keyboardio/Atreus2.cpp b/src/kaleidoscope/device/keyboardio/Atreus2.cpp index d5eb707f..ecaed927 100644 --- a/src/kaleidoscope/device/keyboardio/Atreus2.cpp +++ b/src/kaleidoscope/device/keyboardio/Atreus2.cpp @@ -22,13 +22,12 @@ #include "kaleidoscope/Runtime.h" #include "kaleidoscope/driver/keyscanner/Base_Impl.h" -// We're using the `kaleidoscope::device::keyboardio` namespace, and set up the -// aliases here, so that they're in the global namespace, within the scope of -// this file. We do that, because of how templates are resolved and evaluated, -// see more just down below! -using namespace kaleidoscope::device::keyboardio; -using KeyScannerProps = typename AtreusProps::KeyScannerProps; -using KeyScanner = typename AtreusProps::KeyScanner; + +// Here, we set up aliases to the device's KeyScanner and KeyScannerProps +// in the global namespace within the scope of this file. We'll use these +// aliases to simplify some template initialization code below. +using KeyScannerProps = typename kaleidoscope::device::keyboardio::AtreusProps::KeyScannerProps; +using KeyScanner = typename kaleidoscope::device::keyboardio::AtreusProps::KeyScanner; namespace kaleidoscope { namespace device {