From a792c85cbc21aaebe3922454f0ca354ed6a2b82e Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 17 Dec 2018 03:54:43 -0500 Subject: [PATCH] Cleanup includes more --- include/color.hpp | 2 +- include/dsp/digital.hpp | 1 - include/dsp/filter.hpp | 1 - include/dsp/fir.hpp | 2 +- include/dsp/frame.hpp | 1 - include/dsp/functions.hpp | 1 - include/dsp/minblep.hpp | 1 - include/dsp/resampler.hpp | 7 +++---- include/dsp/ringbuffer.hpp | 3 +-- include/dsp/vumeter.hpp | 1 - include/engine/Engine.hpp | 2 +- include/engine/Module.hpp | 2 +- include/rtmidi.hpp | 2 +- include/ui/common.hpp | 2 +- include/widgets/Widget.hpp | 2 +- include/window.hpp | 8 ++++---- src/Core/AudioInterface.cpp | 9 ++++----- src/Core/MIDICCToCVInterface.cpp | 2 -- src/Core/MIDITriggerToCVInterface.cpp | 1 - src/app/Scene.cpp | 2 +- src/engine/Engine.cpp | 5 ++--- src/main.cpp | 3 ++- src/midi.cpp | 2 +- src/plugin/PluginManager.cpp | 18 +++++++++--------- src/widgets/FramebufferWidget.cpp | 4 ++-- src/window.cpp | 10 +++++----- 26 files changed, 41 insertions(+), 53 deletions(-) diff --git a/include/color.hpp b/include/color.hpp index 48616079..d712d75f 100644 --- a/include/color.hpp +++ b/include/color.hpp @@ -1,7 +1,7 @@ #pragma once #include "common.hpp" #include "string.hpp" -#include "nanovg.h" +#include namespace rack { diff --git a/include/dsp/digital.hpp b/include/dsp/digital.hpp index 360478ea..7cf0f832 100644 --- a/include/dsp/digital.hpp +++ b/include/dsp/digital.hpp @@ -1,5 +1,4 @@ #pragma once - #include "math.hpp" diff --git a/include/dsp/filter.hpp b/include/dsp/filter.hpp index cf47187d..f1080c82 100644 --- a/include/dsp/filter.hpp +++ b/include/dsp/filter.hpp @@ -1,5 +1,4 @@ #pragma once - #include "math.hpp" diff --git a/include/dsp/fir.hpp b/include/dsp/fir.hpp index fcc283f6..a69aa197 100644 --- a/include/dsp/fir.hpp +++ b/include/dsp/fir.hpp @@ -1,6 +1,6 @@ #pragma once #include "dsp/functions.hpp" -#include "pffft.h" +#include namespace rack { diff --git a/include/dsp/frame.hpp b/include/dsp/frame.hpp index 91ee7510..4862093c 100644 --- a/include/dsp/frame.hpp +++ b/include/dsp/frame.hpp @@ -1,5 +1,4 @@ #pragma once - #include diff --git a/include/dsp/functions.hpp b/include/dsp/functions.hpp index 0164a235..617d33bc 100644 --- a/include/dsp/functions.hpp +++ b/include/dsp/functions.hpp @@ -1,5 +1,4 @@ #pragma once - #include "math.hpp" diff --git a/include/dsp/minblep.hpp b/include/dsp/minblep.hpp index 9c489ad9..6bac45db 100644 --- a/include/dsp/minblep.hpp +++ b/include/dsp/minblep.hpp @@ -1,5 +1,4 @@ #pragma once - #include "math.hpp" diff --git a/include/dsp/resampler.hpp b/include/dsp/resampler.hpp index 91159180..bcc114ba 100644 --- a/include/dsp/resampler.hpp +++ b/include/dsp/resampler.hpp @@ -1,11 +1,10 @@ #pragma once - -#include -#include -#include #include "frame.hpp" #include "ringbuffer.hpp" #include "fir.hpp" +#include +#include +#include namespace rack { diff --git a/include/dsp/ringbuffer.hpp b/include/dsp/ringbuffer.hpp index 37d0449c..403a49e6 100644 --- a/include/dsp/ringbuffer.hpp +++ b/include/dsp/ringbuffer.hpp @@ -1,7 +1,6 @@ #pragma once - -#include #include "common.hpp" +#include namespace rack { diff --git a/include/dsp/vumeter.hpp b/include/dsp/vumeter.hpp index fcdfc0dc..e6f95952 100644 --- a/include/dsp/vumeter.hpp +++ b/include/dsp/vumeter.hpp @@ -1,5 +1,4 @@ #pragma once - #include "math.hpp" diff --git a/include/engine/Engine.hpp b/include/engine/Engine.hpp index 9ecf88ae..51a7f0a6 100644 --- a/include/engine/Engine.hpp +++ b/include/engine/Engine.hpp @@ -1,8 +1,8 @@ #pragma once -#include #include "common.hpp" #include "engine/Module.hpp" #include "engine/Wire.hpp" +#include namespace rack { diff --git a/include/engine/Module.hpp b/include/engine/Module.hpp index a2c1890c..e79c5095 100644 --- a/include/engine/Module.hpp +++ b/include/engine/Module.hpp @@ -1,10 +1,10 @@ #pragma once -#include #include "common.hpp" #include "engine/Param.hpp" #include "engine/Input.hpp" #include "engine/Output.hpp" #include "engine/Light.hpp" +#include #include diff --git a/include/rtmidi.hpp b/include/rtmidi.hpp index d27b6302..5c58e62d 100644 --- a/include/rtmidi.hpp +++ b/include/rtmidi.hpp @@ -7,7 +7,7 @@ #ifndef __clang__ #pragma GCC diagnostic ignored "-Wsuggest-override" #endif -#include "rtmidi/RtMidi.h" +#include #pragma GCC diagnostic pop diff --git a/include/ui/common.hpp b/include/ui/common.hpp index 0d958d0c..4c0d82e1 100644 --- a/include/ui/common.hpp +++ b/include/ui/common.hpp @@ -1,6 +1,6 @@ #pragma once #include "../common.hpp" -#include "blendish.h" +#include #define CHECKMARK_STRING "✔" #define CHECKMARK(_cond) ((_cond) ? CHECKMARK_STRING : "") diff --git a/include/widgets/Widget.hpp b/include/widgets/Widget.hpp index cc50ea95..3ee6bffd 100644 --- a/include/widgets/Widget.hpp +++ b/include/widgets/Widget.hpp @@ -1,10 +1,10 @@ #pragma once -#include #include "common.hpp" #include "math.hpp" #include "window.hpp" #include "color.hpp" #include "event.hpp" +#include namespace rack { diff --git a/include/window.hpp b/include/window.hpp index 60df586b..f939a778 100644 --- a/include/window.hpp +++ b/include/window.hpp @@ -4,10 +4,10 @@ #include #define GLEW_STATIC -#include "GL/glew.h" -#include "GLFW/glfw3.h" -#include "nanovg.h" -#include "nanosvg.h" +#include +#include +#include +#include #ifdef ARCH_MAC diff --git a/src/Core/AudioInterface.cpp b/src/Core/AudioInterface.cpp index 46af6cd2..b2b20d83 100644 --- a/src/Core/AudioInterface.cpp +++ b/src/Core/AudioInterface.cpp @@ -1,13 +1,12 @@ -#include +#include "Core.hpp" +#include "audio.hpp" +#include "dsp/resampler.hpp" +#include "dsp/ringbuffer.hpp" #include #include #include #include #include -#include "Core.hpp" -#include "audio.hpp" -#include "dsp/resampler.hpp" -#include "dsp/ringbuffer.hpp" #define AUDIO_OUTPUTS 8 diff --git a/src/Core/MIDICCToCVInterface.cpp b/src/Core/MIDICCToCVInterface.cpp index 985a59ae..a6e00ae9 100644 --- a/src/Core/MIDICCToCVInterface.cpp +++ b/src/Core/MIDICCToCVInterface.cpp @@ -1,8 +1,6 @@ #include "Core.hpp" #include "midi.hpp" #include "dsp/filter.hpp" -#include "window.hpp" -#include "event.hpp" struct MIDICCToCVInterface : Module { diff --git a/src/Core/MIDITriggerToCVInterface.cpp b/src/Core/MIDITriggerToCVInterface.cpp index 7bd2a894..03f1edd0 100644 --- a/src/Core/MIDITriggerToCVInterface.cpp +++ b/src/Core/MIDITriggerToCVInterface.cpp @@ -1,6 +1,5 @@ #include "Core.hpp" #include "midi.hpp" -#include "engine/Engine.hpp" #include "event.hpp" diff --git a/src/app/Scene.cpp b/src/app/Scene.cpp index c9330aa2..b7aacb8c 100644 --- a/src/app/Scene.cpp +++ b/src/app/Scene.cpp @@ -1,10 +1,10 @@ -#include #include "osdialog.h" #include "system.hpp" #include "network.hpp" #include "app/Scene.hpp" #include "app/ModuleBrowser.hpp" #include "app/RackScrollWidget.hpp" +#include namespace rack { diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp index a2ebab3c..7206d18a 100644 --- a/src/engine/Engine.cpp +++ b/src/engine/Engine.cpp @@ -1,14 +1,13 @@ +#include "engine/Engine.hpp" + #include #include #include #include #include - #include #include -#include "engine/Engine.hpp" - namespace rack { diff --git a/src/main.cpp b/src/main.cpp index 112d1326..44ce9c4d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,8 +11,9 @@ #include "app/Scene.hpp" #include "tags.hpp" #include "plugin/PluginManager.hpp" + #include -#include "osdialog.h" +#include #ifdef ARCH_WIN #include diff --git a/src/midi.cpp b/src/midi.cpp index 9d8d0129..a54aa275 100644 --- a/src/midi.cpp +++ b/src/midi.cpp @@ -1,5 +1,5 @@ -#include "rack.hpp" #include "midi.hpp" +#include "string.hpp" #include diff --git a/src/plugin/PluginManager.cpp b/src/plugin/PluginManager.cpp index 0da5527d..fdcf754b 100644 --- a/src/plugin/PluginManager.cpp +++ b/src/plugin/PluginManager.cpp @@ -1,3 +1,11 @@ +#include "plugin/PluginManager.hpp" +#include "system.hpp" +#include "logger.hpp" +#include "network.hpp" +#include "asset.hpp" +#include "string.hpp" +#include "app/common.hpp" + #include #include #include @@ -18,15 +26,7 @@ #include #endif #include - -#include "plugin/PluginManager.hpp" -#include "system.hpp" -#include "logger.hpp" -#include "network.hpp" -#include "asset.hpp" -#include "string.hpp" -#include "app/common.hpp" -#include "osdialog.h" +#include namespace rack { diff --git a/src/widgets/FramebufferWidget.cpp b/src/widgets/FramebufferWidget.cpp index 9f289d41..b80c9f80 100644 --- a/src/widgets/FramebufferWidget.cpp +++ b/src/widgets/FramebufferWidget.cpp @@ -1,6 +1,6 @@ #include "widgets/FramebufferWidget.hpp" -#include "nanovg_gl.h" -#include "nanovg_gl_utils.h" +#include +#include namespace rack { diff --git a/src/window.cpp b/src/window.cpp index 869e2dd4..323b5ea1 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -15,21 +15,21 @@ #include #endif -#include "osdialog.h" +#include #define NANOVG_GL2_IMPLEMENTATION 1 // #define NANOVG_GL3_IMPLEMENTATION 1 // #define NANOVG_GLES2_IMPLEMENTATION 1 // #define NANOVG_GLES3_IMPLEMENTATION 1 -#include "nanovg_gl.h" +#include // Hack to get framebuffer objects working on OpenGL 2 (we blindly assume the extension is supported) #define NANOVG_FBO_VALID 1 -#include "nanovg_gl_utils.h" +#include #define BLENDISH_IMPLEMENTATION -#include "blendish.h" +#include #define NANOSVG_IMPLEMENTATION #define NANOSVG_ALL_COLOR_KEYWORDS -#include "nanosvg.h" +#include namespace rack {