From 8f84192c9b88b99fc2771c3c3d28418f7901d789 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Fri, 7 Jun 2019 12:23:18 +0100 Subject: [PATCH] Fixed some more Android compiler warnings --- .../juce_audio_basics/mpe/juce_MPESynthesiser.h | 2 +- .../utilities/juce_AudioParameterBool.h | 8 ++++---- .../utilities/juce_AudioParameterChoice.h | 8 ++++---- .../utilities/juce_AudioParameterFloat.h | 14 +++++++------- .../utilities/juce_AudioParameterInt.h | 8 ++++---- .../utilities/juce_AudioProcessorParameterWithID.h | 6 +++--- .../utilities/juce_AudioProcessorValueTreeState.h | 4 ++-- .../utilities/juce_RangedAudioParameter.h | 6 +++--- modules/juce_box2d/juce_box2d.h | 1 + modules/juce_core/files/juce_WildcardFileFilter.h | 2 +- .../juce_graphics/native/juce_android_Fonts.cpp | 6 +++--- .../juce_video/native/juce_android_CameraDevice.h | 8 ++++---- 12 files changed, 37 insertions(+), 36 deletions(-) diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h index 1dfae9d843..587ce4df5d 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h @@ -69,7 +69,7 @@ public: @see MPESynthesiserBase, MPEInstrument */ - MPESynthesiser (MPEInstrument* instrument); + MPESynthesiser (MPEInstrument* instrumentToUse); /** Destructor. */ ~MPESynthesiser() override; diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h index cde56567a4..1f728404ef 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h @@ -40,9 +40,9 @@ public: /** Creates a AudioParameterBool with the specified parameters. @param parameterID The parameter ID to use - @param name The parameter name to use + @param parameterName The parameter name to use @param defaultValue The default value - @param label An optional label for the parameter's value + @param parameterLabel An optional label for the parameter's value @param stringFromBool An optional lambda function that converts a bool value to a string with a maximum length. This may be used by hosts to display the parameter's value. @@ -50,8 +50,8 @@ public: converts it into a bool value. Some hosts use this to allow users to type in parameter values. */ - AudioParameterBool (const String& parameterID, const String& name, bool defaultValue, - const String& label = String(), + AudioParameterBool (const String& parameterID, const String& parameterName, bool defaultValue, + const String& parameterLabel = String(), std::function stringFromBool = nullptr, std::function boolFromString = nullptr); diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h index 43fcac5170..32b30e7b28 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h @@ -41,10 +41,10 @@ public: /** Creates a AudioParameterChoice with the specified parameters. @param parameterID The parameter ID to use - @param name The parameter name to use + @param parameterName The parameter name to use @param choices The set of choices to use @param defaultItemIndex The index of the default choice - @param label An optional label for the parameter's value + @param parameterLabel An optional label for the parameter's value @param stringFromIndex An optional lambda function that converts a choice index to a string with a maximum length. This may be used by hosts to display the parameter's value. @@ -52,10 +52,10 @@ public: converts it into a choice index. Some hosts use this to allow users to type in parameter values. */ - AudioParameterChoice (const String& parameterID, const String& name, + AudioParameterChoice (const String& parameterID, const String& parameterName, const StringArray& choices, int defaultItemIndex, - const String& label = String(), + const String& parameterLabel = String(), std::function stringFromIndex = nullptr, std::function indexFromString = nullptr); diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h b/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h index b665d94440..57c2ae09bf 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h @@ -41,11 +41,11 @@ public: /** Creates a AudioParameterFloat with the specified parameters. @param parameterID The parameter ID to use - @param name The parameter name to use + @param parameterName The parameter name to use @param normalisableRange The NormalisableRange to use @param defaultValue The non-normalised default value - @param label An optional label for the parameter's value - @param category An optional parameter category + @param parameterLabel An optional label for the parameter's value + @param parameterCategory An optional parameter category @param stringFromValue An optional lambda function that converts a non-normalised value to a string with a maximum length. This may be used by hosts to display the parameter's value. @@ -54,11 +54,11 @@ public: this to allow users to type in parameter values. */ AudioParameterFloat (const String& parameterID, - const String& name, + const String& parameterName, NormalisableRange normalisableRange, float defaultValue, - const String& label = String(), - Category category = AudioProcessorParameter::genericParameter, + const String& parameterLabel = String(), + Category parameterCategory = AudioProcessorParameter::genericParameter, std::function stringFromValue = nullptr, std::function valueFromString = nullptr); @@ -68,7 +68,7 @@ public: constructor and provide a NormalisableRange. */ AudioParameterFloat (String parameterID, - String name, + String parameterName, float minValue, float maxValue, float defaultValue); diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h index 3d28d61879..610feb18f2 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h @@ -41,11 +41,11 @@ public: /** Creates a AudioParameterInt with the specified parameters. @param parameterID The parameter ID to use - @param name The parameter name to use + @param parameterName The parameter name to use @param minValue The minimum parameter value @param maxValue The maximum parameter value @param defaultValue The default value - @param label An optional label for the parameter's value + @param parameterLabel An optional label for the parameter's value @param stringFromInt An optional lambda function that converts a int value to a string with a maximum length. This may be used by hosts to display the parameter's value. @@ -53,10 +53,10 @@ public: and converts it into an int. Some hosts use this to allow users to type in parameter values. */ - AudioParameterInt (const String& parameterID, const String& name, + AudioParameterInt (const String& parameterID, const String& parameterName, int minValue, int maxValue, int defaultValue, - const String& label = String(), + const String& parameterLabel = String(), std::function stringFromInt = nullptr, std::function intFromString = nullptr); diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h index b63054f499..0981e11976 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h @@ -41,9 +41,9 @@ public: constant for its lifetime. */ AudioProcessorParameterWithID (const String& parameterID, - const String& name, - const String& label = String(), - Category category = AudioProcessorParameter::genericParameter); + const String& parameterName, + const String& parameterLabel = String(), + Category parameterCategory = AudioProcessorParameter::genericParameter); /** Destructor. */ ~AudioProcessorParameterWithID() override; diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h index baba748a0b..fbaafbd771 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h @@ -267,7 +267,7 @@ public: bool isMetaParameter = false, bool isAutomatableParameter = true, bool isDiscrete = false, - AudioProcessorParameter::Category category = AudioProcessorParameter::genericParameter, + AudioProcessorParameter::Category parameterCategory = AudioProcessorParameter::genericParameter, bool isBoolean = false)); /** This function adds a parameter to the attached AudioProcessor and that parameter will @@ -402,7 +402,7 @@ public: bool isMetaParameter = false, bool isAutomatableParameter = true, bool isDiscrete = false, - AudioProcessorParameter::Category category = AudioProcessorParameter::genericParameter, + AudioProcessorParameter::Category parameterCategory = AudioProcessorParameter::genericParameter, bool isBoolean = false); float getDefaultValue() const override; diff --git a/modules/juce_audio_processors/utilities/juce_RangedAudioParameter.h b/modules/juce_audio_processors/utilities/juce_RangedAudioParameter.h index 9fca3582fb..6ff66f182e 100644 --- a/modules/juce_audio_processors/utilities/juce_RangedAudioParameter.h +++ b/modules/juce_audio_processors/utilities/juce_RangedAudioParameter.h @@ -41,9 +41,9 @@ public: constant for its lifetime. */ RangedAudioParameter (const String& parameterID, - const String& name, - const String& label = {}, - Category category = AudioProcessorParameter::genericParameter); + const String& parameterName, + const String& parameterLabel = {}, + Category parameterCategory = AudioProcessorParameter::genericParameter); /** Returns the range of values that the parameter can take. */ virtual const NormalisableRange& getNormalisableRange() const = 0; diff --git a/modules/juce_box2d/juce_box2d.h b/modules/juce_box2d/juce_box2d.h index ca2f68698a..8bf26481fd 100644 --- a/modules/juce_box2d/juce_box2d.h +++ b/modules/juce_box2d/juce_box2d.h @@ -57,6 +57,7 @@ #ifdef JUCE_CLANG #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wconversion" + #pragma clang diagnostic ignored "-Wshadow-field" #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif diff --git a/modules/juce_core/files/juce_WildcardFileFilter.h b/modules/juce_core/files/juce_WildcardFileFilter.h index d6f4ce74e8..505c1ff5c7 100644 --- a/modules/juce_core/files/juce_WildcardFileFilter.h +++ b/modules/juce_core/files/juce_WildcardFileFilter.h @@ -54,7 +54,7 @@ public: */ WildcardFileFilter (const String& fileWildcardPatterns, const String& directoryWildcardPatterns, - const String& description); + const String& filterDescription); /** Destructor. */ ~WildcardFileFilter() override; diff --git a/modules/juce_graphics/native/juce_android_Fonts.cpp b/modules/juce_graphics/native/juce_android_Fonts.cpp index 26445be2d7..e0f5ed4487 100644 --- a/modules/juce_graphics/native/juce_android_Fonts.cpp +++ b/modules/juce_graphics/native/juce_android_Fonts.cpp @@ -425,12 +425,12 @@ private: return file; } - static File getFontFile (const String& family, const String& style) + static File getFontFile (const String& family, const String& fontStyle) { String path ("/system/fonts/" + family); - if (style.isNotEmpty()) - path << '-' << style; + if (fontStyle.isNotEmpty()) + path << '-' << fontStyle; return File (path + ".ttf"); } diff --git a/modules/juce_video/native/juce_android_CameraDevice.h b/modules/juce_video/native/juce_android_CameraDevice.h index 30aa1ab924..2eedb92191 100644 --- a/modules/juce_video/native/juce_android_CameraDevice.h +++ b/modules/juce_video/native/juce_android_CameraDevice.h @@ -2647,10 +2647,10 @@ private: struct CaptureSessionPreviewMode : public CaptureSessionMode { CaptureSessionPreviewMode (Pimpl& ownerToUse, ScopedCameraDevice& cameraDeviceToUse, GlobalRef& handlerToUse, - PreviewDisplay& pd, ImageReader& ir, int cameraSensorOrientation, + PreviewDisplay& pd, ImageReader& ir, int sensorOrientation, int cameraLensFacingToUse, StreamConfigurationMap& streamConfigurationMapToUse) : CaptureSessionMode (ownerToUse, cameraDeviceToUse, handlerToUse, pd, - cameraSensorOrientation, cameraLensFacingToUse, streamConfigurationMapToUse), + sensorOrientation, cameraLensFacingToUse, streamConfigurationMapToUse), imageReader (ir) { } @@ -2712,10 +2712,10 @@ private: struct CaptureSessionVideoRecordingMode : public CaptureSessionMode { CaptureSessionVideoRecordingMode (Pimpl& ownerToUse, ScopedCameraDevice& cameraDeviceToUse, GlobalRef& handlerToUse, - PreviewDisplay& pd, MediaRecorder& mr, int cameraSensorOrientation, + PreviewDisplay& pd, MediaRecorder& mr, int sensorOrientation, int cameraLensFacingToUse, StreamConfigurationMap& streamConfigurationMapToUse) : CaptureSessionMode (ownerToUse, cameraDeviceToUse, handlerToUse, pd, - cameraSensorOrientation, cameraLensFacingToUse, streamConfigurationMapToUse), + sensorOrientation, cameraLensFacingToUse, streamConfigurationMapToUse), mediaRecorder (mr) { }