From c2f567f3ee39060e86c4dfc94199aae8601909e9 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 2 Dec 2024 14:14:27 +0000 Subject: [PATCH] Fix unused variable warnings --- .../utilities/ARA/juce_AudioProcessor_ARAExtensions.cpp | 2 +- .../juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm | 2 +- .../juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm | 4 ++-- modules/juce_video/native/juce_CameraDevice_ios.h | 4 ++-- modules/juce_video/native/juce_CameraDevice_mac.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/juce_audio_processors/utilities/ARA/juce_AudioProcessor_ARAExtensions.cpp b/modules/juce_audio_processors/utilities/ARA/juce_AudioProcessor_ARAExtensions.cpp index 588eb554e1..c34061e153 100644 --- a/modules/juce_audio_processors/utilities/ARA/juce_AudioProcessor_ARAExtensions.cpp +++ b/modules/juce_audio_processors/utilities/ARA/juce_AudioProcessor_ARAExtensions.cpp @@ -134,7 +134,7 @@ void AudioProcessorARAExtension::didBindToARA() noexcept playbackRenderer->araExtension = this; #endif -#if (! JUCE_DISABLE_ASSERTIONS) +#if JUCE_ASSERTIONS_ENABLED_OR_LOGGED // validate proper subclassing of the instance role classes if (auto playbackRenderer = getPlaybackRenderer()) jassert (dynamic_cast (playbackRenderer) != nullptr); diff --git a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm index 664243a03a..0f5ff074f3 100644 --- a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm +++ b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm @@ -1633,7 +1633,7 @@ public: const auto handled = [&]() -> bool { - if (auto* target = findCurrentTextInputTarget()) + if (findCurrentTextInputTarget() != nullptr) if (const auto* inputContext = [view inputContext]) return [inputContext handleEvent: ev] && ! viewCannotHandleEvent; diff --git a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm index 2d7835d82b..c3f6341ba6 100644 --- a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +++ b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm @@ -1107,7 +1107,7 @@ static void postTraitChangeNotification (UITraitCollection* previousTraitCollect - (BOOL) canPerformAction: (SEL) action withSender: (id) sender { - if (auto* target = [self getTextInputTarget]) + if ([self getTextInputTarget] != nullptr) { if (action == @selector (paste:)) return [[UIPasteboard generalPasteboard] hasStrings]; @@ -1266,7 +1266,7 @@ static void postTraitChangeNotification (UITraitCollection* previousTraitCollect - (UITextRange*) markedTextRange { if (owner != nullptr && owner->stringBeingComposed.isNotEmpty()) - if (auto* target = owner->findCurrentTextInputTarget()) + if (owner->findCurrentTextInputTarget() != nullptr) return [JuceUITextRange withRange: owner->getMarkedTextRange()]; return nil; diff --git a/modules/juce_video/native/juce_CameraDevice_ios.h b/modules/juce_video/native/juce_CameraDevice_ios.h index 395385fa70..d0812c71d8 100644 --- a/modules/juce_video/native/juce_CameraDevice_ios.h +++ b/modules/juce_video/native/juce_CameraDevice_ios.h @@ -646,7 +646,7 @@ private: printImageOutputDebugInfo (captureOutput); - if (auto* connection = findVideoConnection (captureOutput)) + if (findVideoConnection (captureOutput) != nullptr) { auto* photoOutput = (AVCapturePhotoOutput*) captureOutput; auto outputConnection = [photoOutput connectionWithMediaType: AVMediaTypeVideo]; @@ -1176,7 +1176,7 @@ struct CameraDevice::ViewerComponent : public UIViewComponent { if ([keyPath isEqualToString: @"videoRotationAngleForHorizonLevelPreview"]) { - if (auto* previewLayer = getPreviewLayer (self)) + if (getPreviewLayer (self) != nullptr) { auto* viewer = static_cast (context); auto& session = viewer->cameraDevice.pimpl->captureSession; diff --git a/modules/juce_video/native/juce_CameraDevice_mac.h b/modules/juce_video/native/juce_CameraDevice_mac.h index df409217db..f87dcd6893 100644 --- a/modules/juce_video/native/juce_CameraDevice_mac.h +++ b/modules/juce_video/native/juce_CameraDevice_mac.h @@ -542,7 +542,7 @@ private: startSession(); - if (auto* videoConnection = getVideoConnection()) + if (getVideoConnection() != nullptr) imageOutput->triggerImageCapture (*this); }