From 1c5e374192da80d09b8c4078c316bc0de4214a01 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sat, 28 Jul 2018 14:44:51 +0200 Subject: [PATCH] MSVC: Fix Xpressive instrument --- plugins/CMakeLists.txt | 1 - plugins/Xpressive/CMakeLists.txt | 2 ++ plugins/Xpressive/Xpressive.cpp | 7 ------- plugins/Xpressive/Xpressive.h | 10 ++-------- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 8f751b10d..b4a1081f6 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -93,7 +93,6 @@ IF(MSVC) LadspaEffect sid #VstEffect - Xpressive zynaddsubfx ) message(WARNING "Compiling with MSVC. The following plugins are not available: ${MSVC_INCOMPATIBLE_PLUGINS}") diff --git a/plugins/Xpressive/CMakeLists.txt b/plugins/Xpressive/CMakeLists.txt index 6745c71d5..366381e62 100644 --- a/plugins/Xpressive/CMakeLists.txt +++ b/plugins/Xpressive/CMakeLists.txt @@ -12,6 +12,8 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WERROR_FLAGS} -fexceptions") IF(LMMS_BUILD_WIN32 AND NOT MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -Dexprtk_disable_enhanced_features") +ELSEIF(LMMS_BUILD_WIN32 AND MSVC) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") ENDIF() BUILD_PLUGIN(xpressive diff --git a/plugins/Xpressive/Xpressive.cpp b/plugins/Xpressive/Xpressive.cpp index 5822c9567..cb0293710 100644 --- a/plugins/Xpressive/Xpressive.cpp +++ b/plugins/Xpressive/Xpressive.cpp @@ -807,8 +807,6 @@ void XpressiveView::usrWaveClicked() { Engine::getSong()->setModified(); } -XpressiveHelpView* XpressiveHelpView::s_instance=0; - QString XpressiveHelpView::s_helpText= "O1, O2 - Two output waves. Panning is controled by PN1 and PN2.
" "W1, W2, W3 - Wave samples evaluated by expression. In these samples, t variable ranges [0,1).
" @@ -876,11 +874,6 @@ void XpressiveView::helpClicked() { } -__attribute__((destructor)) static void module_destroy() -{ - XpressiveHelpView::finalize(); -} - extern "C" { // necessary for getting instance out of shared lib diff --git a/plugins/Xpressive/Xpressive.h b/plugins/Xpressive/Xpressive.h index 9d4636ca5..ca80f2b78 100644 --- a/plugins/Xpressive/Xpressive.h +++ b/plugins/Xpressive/Xpressive.h @@ -206,22 +206,16 @@ class XpressiveHelpView: public QTextEdit public: static XpressiveHelpView* getInstance() { - if (!s_instance) - { - s_instance = new XpressiveHelpView(); - } - return s_instance; + static XpressiveHelpView instance; + return &instance; } static void finalize() { - if (s_instance) { delete s_instance; } } private: XpressiveHelpView(); - static XpressiveHelpView *s_instance; static QString s_helpText; - }; #endif