Browse Source

Fix compiler warnings

pull/357/head
falkTX 3 years ago
parent
commit
4a4f54531a
2 changed files with 15 additions and 0 deletions
  1. +11
    -0
      distrho/src/DistrhoPluginVST3.cpp
  2. +4
    -0
      distrho/src/DistrhoPluginVST3.hpp

+ 11
- 0
distrho/src/DistrhoPluginVST3.cpp View File

@@ -1312,8 +1312,10 @@ public:
const v3_param_id rindex = v3_cpp_obj(queue)->get_param_id(queue); const v3_param_id rindex = v3_cpp_obj(queue)->get_param_id(queue);
DISTRHO_SAFE_ASSERT_UINT_BREAK(rindex < fVst3ParameterCount, rindex); DISTRHO_SAFE_ASSERT_UINT_BREAK(rindex < fVst3ParameterCount, rindex);


#ifdef DPF_VST3_HAS_INTERNAL_PARAMETERS
if (rindex < kVst3InternalParameterCount) if (rindex < kVst3InternalParameterCount)
continue; continue;
#endif


if (v3_cpp_obj(queue)->get_point_count(queue) <= 0) if (v3_cpp_obj(queue)->get_point_count(queue) <= 0)
continue; continue;
@@ -1353,8 +1355,10 @@ public:
const v3_param_id rindex = v3_cpp_obj(queue)->get_param_id(queue); const v3_param_id rindex = v3_cpp_obj(queue)->get_param_id(queue);
DISTRHO_SAFE_ASSERT_UINT_BREAK(rindex < fVst3ParameterCount, rindex); DISTRHO_SAFE_ASSERT_UINT_BREAK(rindex < fVst3ParameterCount, rindex);


#ifdef DPF_VST3_HAS_INTERNAL_PARAMETERS
if (rindex < kVst3InternalParameterCount) if (rindex < kVst3InternalParameterCount)
continue; continue;
#endif


const int32_t pcount = v3_cpp_obj(queue)->get_point_count(queue); const int32_t pcount = v3_cpp_obj(queue)->get_point_count(queue);


@@ -1752,6 +1756,7 @@ public:
return V3_INVALID_ARG; return V3_INVALID_ARG;
#endif #endif


#ifdef DPF_VST3_HAS_INTERNAL_PARAMETERS
if (rindex < kVst3InternalParameterBaseCount) if (rindex < kVst3InternalParameterBaseCount)
{ {
fCachedParameterValues[rindex] = normalizedParameterToPlain(rindex, normalized); fCachedParameterValues[rindex] = normalizedParameterToPlain(rindex, normalized);
@@ -1797,6 +1802,7 @@ public:


return V3_OK; return V3_OK;
} }
#endif


#if DPF_VST3_USES_SEPARATE_CONTROLLER #if DPF_VST3_USES_SEPARATE_CONTROLLER
const uint32_t index = static_cast<uint32_t>(rindex - kVst3InternalParameterCount); const uint32_t index = static_cast<uint32_t>(rindex - kVst3InternalParameterCount);
@@ -1805,6 +1811,11 @@ public:
setNormalizedPluginParameterValue(index, normalized); setNormalizedPluginParameterValue(index, normalized);
#endif #endif
return V3_OK; return V3_OK;

#ifndef DPF_VST3_HAS_INTERNAL_PARAMETERS
// unused
(void)rindex;
#endif
} }


v3_result setComponentHandler(v3_component_handler** const handler) noexcept v3_result setComponentHandler(v3_component_handler** const handler) noexcept


+ 4
- 0
distrho/src/DistrhoPluginVST3.hpp View File

@@ -83,6 +83,10 @@ enum Vst3InternalParameters {
#endif #endif
}; };


#if DPF_VST3_USES_SEPARATE_CONTROLLER || DISTRHO_PLUGIN_WANT_LATENCY || DISTRHO_PLUGIN_WANT_PROGRAMS || DISTRHO_PLUGIN_WANT_MIDI_INPUT
# define DPF_VST3_HAS_INTERNAL_PARAMETERS
#endif

// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


static inline static inline


Loading…
Cancel
Save