1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Warnings: Fix missing-prototypes warnings

This commit is contained in:
reuk 2022-04-11 13:30:46 +01:00
parent 3bf635e004
commit 19ddbe2368
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
38 changed files with 133 additions and 75 deletions

View file

@ -279,7 +279,7 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UnityPeer)
};
ComponentPeer* createUnityPeer (Component& c) { return new UnityPeer (c); }
static ComponentPeer* createUnityPeer (Component& c) { return new UnityPeer (c); }
//==============================================================================
class AudioProcessorUnityWrapper
@ -486,7 +486,7 @@ private:
};
//==============================================================================
HashMap<int, AudioProcessorUnityWrapper*>& getWrapperMap()
static HashMap<int, AudioProcessorUnityWrapper*>& getWrapperMap()
{
static HashMap<int, AudioProcessorUnityWrapper*> wrapperMap;
return wrapperMap;
@ -505,7 +505,7 @@ static void onWrapperDeletion (AudioProcessorUnityWrapper* wrapperToRemove)
//==============================================================================
namespace UnityCallbacks
{
int UNITY_INTERFACE_API createCallback (UnityAudioEffectState* state)
static int UNITY_INTERFACE_API createCallback (UnityAudioEffectState* state)
{
auto* pluginInstance = new AudioProcessorUnityWrapper (false);
pluginInstance->create (state);
@ -517,7 +517,7 @@ namespace UnityCallbacks
return 0;
}
int UNITY_INTERFACE_API releaseCallback (UnityAudioEffectState* state)
static int UNITY_INTERFACE_API releaseCallback (UnityAudioEffectState* state)
{
auto* pluginInstance = state->getEffectData<AudioProcessorUnityWrapper>();
pluginInstance->release();
@ -531,7 +531,7 @@ namespace UnityCallbacks
return 0;
}
int UNITY_INTERFACE_API resetCallback (UnityAudioEffectState* state)
static int UNITY_INTERFACE_API resetCallback (UnityAudioEffectState* state)
{
auto* pluginInstance = state->getEffectData<AudioProcessorUnityWrapper>();
pluginInstance->reset();
@ -539,14 +539,14 @@ namespace UnityCallbacks
return 0;
}
int UNITY_INTERFACE_API setPositionCallback (UnityAudioEffectState* state, unsigned int pos)
static int UNITY_INTERFACE_API setPositionCallback (UnityAudioEffectState* state, unsigned int pos)
{
ignoreUnused (state, pos);
return 0;
}
int UNITY_INTERFACE_API setFloatParameterCallback (UnityAudioEffectState* state, int index, float value)
static int UNITY_INTERFACE_API setFloatParameterCallback (UnityAudioEffectState* state, int index, float value)
{
auto* pluginInstance = state->getEffectData<AudioProcessorUnityWrapper>();
pluginInstance->setParameter (index, value);
@ -554,7 +554,7 @@ namespace UnityCallbacks
return 0;
}
int UNITY_INTERFACE_API getFloatParameterCallback (UnityAudioEffectState* state, int index, float* value, char* valueStr)
static int UNITY_INTERFACE_API getFloatParameterCallback (UnityAudioEffectState* state, int index, float* value, char* valueStr)
{
auto* pluginInstance = state->getEffectData<AudioProcessorUnityWrapper>();
*value = pluginInstance->getParameter (index);
@ -564,7 +564,7 @@ namespace UnityCallbacks
return 0;
}
int UNITY_INTERFACE_API getFloatBufferCallback (UnityAudioEffectState* state, const char* name, float* buffer, int numSamples)
static int UNITY_INTERFACE_API getFloatBufferCallback (UnityAudioEffectState* state, const char* name, float* buffer, int numSamples)
{
ignoreUnused (numSamples);
@ -608,8 +608,8 @@ namespace UnityCallbacks
return 0;
}
int UNITY_INTERFACE_API processCallback (UnityAudioEffectState* state, float* inBuffer, float* outBuffer,
unsigned int bufferSize, int numInChannels, int numOutChannels)
static int UNITY_INTERFACE_API processCallback (UnityAudioEffectState* state, float* inBuffer, float* outBuffer,
unsigned int bufferSize, int numInChannels, int numOutChannels)
{
auto* pluginInstance = state->getEffectData<AudioProcessorUnityWrapper>();
@ -769,6 +769,8 @@ UNITY_INTERFACE_EXPORT void UNITY_INTERFACE_API unitySetScreenBounds (int id, fl
//==============================================================================
#if JUCE_WINDOWS
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes")
extern "C" BOOL WINAPI DllMain (HINSTANCE instance, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
@ -776,6 +778,8 @@ UNITY_INTERFACE_EXPORT void UNITY_INTERFACE_API unitySetScreenBounds (int id, fl
return true;
}
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
#endif
#endif