commit 3e95653e65f706cc68347e98f125b86fffff8dea
parent 4c2b313bc32f1abd8f9002f990adbd382f420352
Author: Matt Demanett <matt@demanett.net>
Date: Sat, 6 Jan 2018 14:00:02 -0500
Use a namespace on module classes.
Diffstat:
5 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/BogaudioModules.hpp b/src/BogaudioModules.hpp
@@ -10,9 +10,12 @@
#include "widgets.hpp"
using namespace rack;
+using namespace bogaudio;
extern Plugin *plugin;
+namespace bogaudio {
+
struct ShaperWidget : ModuleWidget {
ShaperWidget();
};
@@ -57,3 +60,5 @@ struct NoiseWidget : ModuleWidget {
struct ReftoneWidget : ModuleWidget {
ReftoneWidget();
};
+
+} // namespae bogaudio
diff --git a/src/DADSRHCore.hpp b/src/DADSRHCore.hpp
@@ -1,6 +1,8 @@
#include "BogaudioModules.hpp"
+namespace bogaudio {
+
struct DADSRHCore {
enum Stage {
STOPPED_STAGE,
@@ -167,3 +169,5 @@ struct DADSRHCore {
float knobTime(const Param& knob, const Input* cv, bool slow, bool allowZero = false);
float knobAmount(const Param& knob, const Input* cv) const;
};
+
+} // namespace bogaudio
diff --git a/src/ShaperCore.hpp b/src/ShaperCore.hpp
@@ -1,6 +1,8 @@
#include "BogaudioModules.hpp"
+namespace bogaudio {
+
struct ShaperCore {
enum Stage {
STOPPED_STAGE,
@@ -123,3 +125,5 @@ struct ShaperCore {
bool stepStage(const Param& knob, const Input* cv, bool slow);
float levelParam(const Param& knob, const Input* cv) const;
};
+
+} // namespace bogaudio
diff --git a/src/widgets.cpp b/src/widgets.cpp
@@ -1,5 +1,8 @@
+
#include "widgets.hpp"
+using namespace bogaudio;
+
StatefulButton::StatefulButton(const char* offSVGPath, const char* onSVGPath) {
_svgWidget = new SVGWidget();
addChild(_svgWidget);
diff --git a/src/widgets.hpp b/src/widgets.hpp
@@ -4,6 +4,7 @@ using namespace rack;
extern Plugin *plugin;
+namespace bogaudio {
struct Button18 : SVGSwitch, MomentarySwitch {
Button18() {
@@ -62,3 +63,5 @@ struct StatefulButton : ParamWidget, FramebufferWidget {
struct StatefulButton9 : StatefulButton {
StatefulButton9() : StatefulButton("res/button_9px_0.svg", "res/button_9px_1.svg") {}
};
+
+} // namespace bogaudio