diff --git a/modules/juce_audio_devices/native/juce_android_Oboe.cpp b/modules/juce_audio_devices/native/juce_android_Oboe.cpp index fc275a3db4..99664f3d4a 100644 --- a/modules/juce_audio_devices/native/juce_android_Oboe.cpp +++ b/modules/juce_audio_devices/native/juce_android_Oboe.cpp @@ -391,9 +391,9 @@ private: // Setting nullptr callback is allowed only when playback is stopped. jassert (callbackToUse != nullptr); - while (true) + for (;;) { - AudioIODeviceCallback* old = callback.get(); + auto old = callback.get(); if (old == callbackToUse) break; @@ -409,7 +409,7 @@ private: void process (const float** inputChannelData, int numInputChannels, float** outputChannelData, int numOutputChannels, int32_t numFrames) { - if (AudioIODeviceCallback* cb = callback.exchange (nullptr)) + if (auto* cb = callback.exchange (nullptr)) { cb->audioDeviceIOCallback (inputChannelData, numInputChannels, outputChannelData, numOutputChannels, numFrames); diff --git a/modules/juce_events/native/juce_android_Messaging.cpp b/modules/juce_events/native/juce_android_Messaging.cpp index 0088e1e7b7..a43d97a9d9 100644 --- a/modules/juce_events/native/juce_android_Messaging.cpp +++ b/modules/juce_events/native/juce_android_Messaging.cpp @@ -94,7 +94,7 @@ private: void run() override { - while (true) + for (;;) { MessageManager::MessageBase::Ptr message (queue.removeAndReturn (0)); diff --git a/modules/juce_gui_basics/native/juce_android_ContentSharer.cpp b/modules/juce_gui_basics/native/juce_android_ContentSharer.cpp index 548a46c631..6911527255 100644 --- a/modules/juce_gui_basics/native/juce_android_ContentSharer.cpp +++ b/modules/juce_gui_basics/native/juce_android_ContentSharer.cpp @@ -332,7 +332,7 @@ private: auto buffer = LocalRef (env->NewByteArray (1024)); int bytesRead = 0; - while (true) + for (;;) { if (threadShouldExit()) return {}; diff --git a/modules/juce_gui_extra/native/juce_android_WebBrowserComponent.cpp b/modules/juce_gui_extra/native/juce_android_WebBrowserComponent.cpp index 736efa0456..fab2c3e1da 100644 --- a/modules/juce_gui_extra/native/juce_android_WebBrowserComponent.cpp +++ b/modules/juce_gui_extra/native/juce_android_WebBrowserComponent.cpp @@ -339,13 +339,13 @@ private: { MemoryOutputStream ostream; - while (true) + for (;;) { if (threadShouldExit()) return; char buffer [8192]; - const int num = webInputStream->read (buffer, sizeof (buffer)); + auto num = webInputStream->read (buffer, sizeof (buffer)); if (num <= 0) break; diff --git a/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp b/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp index d29e412cd6..0fcdc9183c 100644 --- a/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp +++ b/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp @@ -57,7 +57,7 @@ public: void tryNextRead() { - while (true) + for (;;) { size_t len = (receivingLength ? sizeof (size_t) : bufferLength.len);