commit 69744feaf21afaa8b7172fbf0cae4fb29813b86d
parent 95d1467086f3d75ca1b9ec83adc0049ab975490a
Author: falkTX <falktx@falktx.com>
Date: Thu, 12 Aug 2021 14:14:42 +0100
Fix build without "using namespace"
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
5 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/distrho/extra/LibraryUtils.hpp b/distrho/extra/LibraryUtils.hpp
@@ -31,6 +31,8 @@ typedef HMODULE lib_t;
typedef void* lib_t;
#endif
+START_NAMESPACE_DISTRHO
+
// -----------------------------------------------------------------------
// library related calls
@@ -129,4 +131,6 @@ const char* lib_error(const char* const filename) noexcept
// -----------------------------------------------------------------------
+END_NAMESPACE_DISTRHO
+
#endif // DISTRHO_LIBRARY_UTILS_HPP_INCLUDED
diff --git a/distrho/src/DistrhoUIInternal.hpp b/distrho/src/DistrhoUIInternal.hpp
@@ -321,7 +321,7 @@ public:
bool handlePluginKeyboard(const bool press, const uint key, const uint16_t mods)
{
// TODO also trigger Character input event
- Widget::KeyboardEvent ev;
+ DGL_NAMESPACE::Widget::KeyboardEvent ev;
ev.press = press;
ev.key = key;
ev.mod = mods;
@@ -330,7 +330,7 @@ public:
bool handlePluginSpecial(const bool press, const DGL_NAMESPACE::Key key, const uint16_t mods)
{
- Widget::SpecialEvent ev;
+ DGL_NAMESPACE::Widget::SpecialEvent ev;
ev.press = press;
ev.key = key;
ev.mod = mods;
diff --git a/distrho/src/DistrhoUIPrivateData.hpp b/distrho/src/DistrhoUIPrivateData.hpp
@@ -70,10 +70,10 @@ public:
// TODO external ui stuff
class PluginWindow
{
- UI* const ui;
+ DISTRHO_NAMESPACE::UI* const ui;
public:
- explicit PluginWindow(UI* const uiPtr,
+ explicit PluginWindow(DISTRHO_NAMESPACE::UI* const uiPtr,
PluginApplication& app,
const uintptr_t parentWindowHandle,
const uint width,
@@ -107,10 +107,10 @@ public:
#else
class PluginWindow : public Window
{
- UI* const ui;
+ DISTRHO_NAMESPACE::UI* const ui;
public:
- explicit PluginWindow(UI* const uiPtr,
+ explicit PluginWindow(DISTRHO_NAMESPACE::UI* const uiPtr,
PluginApplication& app,
const uintptr_t parentWindowHandle,
const uint width,
@@ -312,7 +312,7 @@ inline bool UI::PrivateData::fileRequestCallback(const char* const key)
snprintf(title, sizeof(title)-1u, DISTRHO_PLUGIN_NAME ": %s", key);
title[sizeof(title)-1u] = '\0';
- Window::FileBrowserOptions opts;
+ DGL_NAMESPACE::Window::FileBrowserOptions opts;
opts.title = title;
return window->openFileBrowser(opts);
#endif
diff --git a/distrho/src/jackbridge/JackBridge.cpp b/distrho/src/jackbridge/JackBridge.cpp
@@ -424,6 +424,7 @@ struct JackBridge {
# else
const char* const filename("libjack.so.0");
# endif
+ USE_NAMESPACE_DISTRHO
lib = lib_open(filename);
@@ -563,6 +564,8 @@ struct JackBridge {
~JackBridge() noexcept
{
+ USE_NAMESPACE_DISTRHO
+
if (lib != nullptr)
{
lib_close(lib);
diff --git a/distrho/src/jackbridge/RtAudioBridge.hpp b/distrho/src/jackbridge/RtAudioBridge.hpp
@@ -40,6 +40,9 @@
# include "../../extra/RingBuffer.hpp"
# include "../../extra/ScopedPointer.hpp"
+using DISTRHO_NAMESPACE::HeapRingBuffer;
+using DISTRHO_NAMESPACE::ScopedPointer;
+
struct RtAudioBridge {
// pointer to RtAudio instance
ScopedPointer<RtAudio> handle;