Browse Source

More effc++ fixing

tags/1.9.4
falkTX 10 years ago
parent
commit
2b36e1a6f6
2 changed files with 21 additions and 6 deletions
  1. +17
    -6
      source/backend/engine/CarlaEngineInternal.cpp
  2. +4
    -0
      source/backend/engine/CarlaEngineInternal.hpp

+ 17
- 6
source/backend/engine/CarlaEngineInternal.cpp View File

@@ -67,7 +67,8 @@ EngineInternalTime::EngineInternalTime() noexcept
EngineNextAction::EngineNextAction() noexcept
: opcode(kEnginePostActionNull),
pluginId(0),
value(0) {}
value(0),
waitEvent() {}

EngineNextAction::~EngineNextAction() noexcept
{
@@ -97,15 +98,25 @@ CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept
isIdling(0),
curPluginCount(0),
maxPluginNumber(0),
#ifndef BUILD_BRIDGE
nextPluginId(0),
plugins(nullptr) {}
#else
nextPluginId(0)
lastError(),
name(),
options(),
timeInfo(),
#ifndef BUILD_BRIDGE
plugins(nullptr),
#endif
events(),
#ifndef BUILD_BRIDGE
graph(),
#endif
time(),
nextAction()
{
#ifdef BUILD_BRIDGE
carla_zeroStruct(plugins, 1);
}
#endif
}

CarlaEngine::ProtectedData::~ProtectedData() noexcept
{


+ 4
- 0
source/backend/engine/CarlaEngineInternal.hpp View File

@@ -26,6 +26,9 @@
using juce::Atomic;
using juce::WaitableEvent;

// FIXME only use CARLA_PREVENT_HEAP_ALLOCATION for structs
// maybe separate macro

CARLA_BACKEND_START_NAMESPACE

// -----------------------------------------------------------------------
@@ -87,6 +90,7 @@ private:
PatchbayGraph* fPatchbay;
};

CARLA_PREVENT_HEAP_ALLOCATION
CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalGraph)
};
#endif


Loading…
Cancel
Save