From d873d2426a2a26328fec7c776fc5de2c3bfbd6f8 Mon Sep 17 00:00:00 2001 From: tpoole Date: Tue, 23 Aug 2016 22:32:10 +0100 Subject: [PATCH] Fix some Xcode warnings in the VST and VST3 wrappers. --- modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | 6 +++--- modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index d9b3eda5ba..6a8d2af038 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -546,7 +546,7 @@ public: { isProcessing = true; - const size_t nInAndOutChannels = vstEffect.numInputChannels + vstEffect.numOutputChannels; + const size_t nInAndOutChannels = static_cast (vstEffect.numInputChannels + vstEffect.numOutputChannels); floatTempBuffers .channels.calloc (nInAndOutChannels); doubleTempBuffers.channels.calloc (nInAndOutChannels); @@ -1604,8 +1604,8 @@ private: // The last member of a full VstSpeakerConfiguration struct is an array of 8 // VstIndividualSpeakerInfo. Here we only allocate space for channels we will // actually use. - const int allocationSizeToSubtract = (8 - nChannels) * sizeof (VstIndividualSpeakerInfo); - const int allocationSize = sizeof (VstSpeakerConfiguration) - allocationSizeToSubtract; + const size_t allocationSizeToSubtract = static_cast (8 - nChannels) * sizeof (VstIndividualSpeakerInfo); + const size_t allocationSize = sizeof (VstSpeakerConfiguration) - allocationSizeToSubtract; char* newAllocation = new char[allocationSize]; memset (newAllocation, 0, allocationSize); diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 79b82d27a7..345addae77 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -2101,7 +2101,7 @@ private: // Consider yourself very unlucky if you hit this assertion. The hash code of your // parameter ids are not unique. - jassert (! vstParamIDs.contains (static_cast (paramID))); + jassert (! vstParamIDs.contains (static_cast (paramID))); vstParamIDs.add (paramID); paramMap.set (static_cast (paramID), i);