From af2dcca279e6fc23c9b1694170cbdfe36b32eb79 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 9 Jan 2018 15:05:35 +0100 Subject: logic, cv: fix header namespace pollution We've had "using namespace options;" in headers for a while now. --- logic/main-settings.hpp | 11 ++++++++++- logic/mappings.hpp | 1 - logic/shortcuts.h | 6 ++++++ logic/state.hpp | 1 - 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'logic') diff --git a/logic/main-settings.hpp b/logic/main-settings.hpp index fd3384eb..3ea68bca 100644 --- a/logic/main-settings.hpp +++ b/logic/main-settings.hpp @@ -10,12 +10,15 @@ #include #include "options/options.hpp" -using namespace options; #include "api/plugin-api.hpp" #include "spline/axis-opts.hpp" #include "export.hpp" +namespace main_settings_impl { + +using namespace options; + struct OTR_LOGIC_EXPORT key_opts { value keycode, guid; @@ -58,3 +61,9 @@ struct OTR_LOGIC_EXPORT main_settings final main_settings(); }; + +} // ns main_settings_impl + +using main_settings_impl::key_opts; +using main_settings_impl::module_settings; +using main_settings_impl::main_settings; diff --git a/logic/mappings.hpp b/logic/mappings.hpp index 834e969e..7bb5f9af 100644 --- a/logic/mappings.hpp +++ b/logic/mappings.hpp @@ -9,7 +9,6 @@ #include "export.hpp" #include "options/options.hpp" -using namespace options; #include "spline/spline.hpp" #include "main-settings.hpp" diff --git a/logic/shortcuts.h b/logic/shortcuts.h index 6f69aba9..457c0d8e 100644 --- a/logic/shortcuts.h +++ b/logic/shortcuts.h @@ -25,6 +25,8 @@ #include #include +namespace shortcuts_impl { + using namespace options; class OTR_LOGIC_EXPORT Shortcuts final : public QObject @@ -61,3 +63,7 @@ private: void free_binding(K& key); void bind_shortcut(K &key, const key_opts& k, bool held); }; + +} // ns shortcuts_impl + +using shortcuts_impl::Shortcuts; diff --git a/logic/state.hpp b/logic/state.hpp index fb9587bf..25205524 100644 --- a/logic/state.hpp +++ b/logic/state.hpp @@ -9,7 +9,6 @@ #pragma once #include "options/options.hpp" -using namespace options; #include "api/plugin-support.hpp" #include "main-settings.hpp" #include "mappings.hpp" -- cgit v1.2.3