Browse Source

Minor tidying up

tags/2021-05-28
jules 7 years ago
parent
commit
cfc85445b5
5 changed files with 8 additions and 8 deletions
  1. +3
    -3
      modules/juce_audio_devices/native/juce_android_Oboe.cpp
  2. +1
    -1
      modules/juce_events/native/juce_android_Messaging.cpp
  3. +1
    -1
      modules/juce_gui_basics/native/juce_android_ContentSharer.cpp
  4. +2
    -2
      modules/juce_gui_extra/native/juce_android_WebBrowserComponent.cpp
  5. +1
    -1
      modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp

+ 3
- 3
modules/juce_audio_devices/native/juce_android_Oboe.cpp View File

@@ -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);


+ 1
- 1
modules/juce_events/native/juce_android_Messaging.cpp View File

@@ -94,7 +94,7 @@ private:
void run() override
{
while (true)
for (;;)
{
MessageManager::MessageBase::Ptr message (queue.removeAndReturn (0));


+ 1
- 1
modules/juce_gui_basics/native/juce_android_ContentSharer.cpp View File

@@ -332,7 +332,7 @@ private:
auto buffer = LocalRef<jbyteArray> (env->NewByteArray (1024));
int bytesRead = 0;
while (true)
for (;;)
{
if (threadShouldExit())
return {};


+ 2
- 2
modules/juce_gui_extra/native/juce_android_WebBrowserComponent.cpp View File

@@ -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;


+ 1
- 1
modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp View File

@@ -57,7 +57,7 @@ public:
void tryNextRead()
{
while (true)
for (;;)
{
size_t len = (receivingLength ? sizeof (size_t) : bufferLength.len);


Loading…
Cancel
Save