diff --git a/examples/audio plugin demo/Source/PluginProcessor.cpp b/examples/audio plugin demo/Source/PluginProcessor.cpp index 43e3506f64..fc73ae8b84 100644 --- a/examples/audio plugin demo/Source/PluginProcessor.cpp +++ b/examples/audio plugin demo/Source/PluginProcessor.cpp @@ -158,7 +158,7 @@ public: return defaultValue; } - String getName (int maximumStringLength) const override + String getName (int /* maximumStringLength */) const override { return name; } @@ -207,11 +207,11 @@ JuceDemoPluginAudioProcessor::~JuceDemoPluginAudioProcessor() } //============================================================================== -void JuceDemoPluginAudioProcessor::prepareToPlay (double sampleRate, int /*samplesPerBlock*/) +void JuceDemoPluginAudioProcessor::prepareToPlay (double newSampleRate, int /*samplesPerBlock*/) { // Use this method as the place to do any pre-playback // initialisation that you need.. - synth.setCurrentPlaybackSampleRate (sampleRate); + synth.setCurrentPlaybackSampleRate (newSampleRate); keyboardState.reset(); delayBuffer.clear(); } @@ -328,8 +328,8 @@ void JuceDemoPluginAudioProcessor::setStateInformation (const void* data, int si lastUIWidth = xmlState->getIntAttribute ("uiWidth", lastUIWidth); lastUIHeight = xmlState->getIntAttribute ("uiHeight", lastUIHeight); - gain->setValue (xmlState->getDoubleAttribute ("gain", gain->getValue())); - delay->setValue (xmlState->getDoubleAttribute ("delay", delay->getValue())); + gain->setValue ((float) xmlState->getDoubleAttribute ("gain", gain->getValue())); + delay->setValue ((float) xmlState->getDoubleAttribute ("delay", delay->getValue())); } } } diff --git a/extras/Introjucer/Source/Project/jucer_ProjectType.cpp b/extras/Introjucer/Source/Project/jucer_ProjectType.cpp index ab28f38bfa..d7dbd54385 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectType.cpp +++ b/extras/Introjucer/Source/Project/jucer_ProjectType.cpp @@ -87,6 +87,7 @@ public: exporter.msvcIsWindowsSubsystem = true; exporter.msvcTargetSuffix = ".exe"; + exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", ""); } }; @@ -118,6 +119,7 @@ public: exporter.msvcIsWindowsSubsystem = false; exporter.msvcTargetSuffix = ".exe"; exporter.msvcExtraPreprocessorDefs.set ("_CONSOLE", ""); + exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", ""); } }; @@ -147,6 +149,7 @@ public: exporter.makefileTargetSuffix = ".a"; exporter.msvcTargetSuffix = ".lib"; exporter.msvcExtraPreprocessorDefs.set ("_LIB", ""); + exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", ""); } }; @@ -177,6 +180,7 @@ public: exporter.makefileTargetSuffix = ".so"; exporter.msvcTargetSuffix = ".dll"; exporter.msvcExtraPreprocessorDefs.set ("_LIB", ""); + exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", ""); } }; @@ -304,7 +308,7 @@ public: exporter.msvcTargetSuffix = ".dll"; exporter.msvcIsDLL = true; - + exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", ""); exporter.makefileIsDLL = true; } @@ -355,6 +359,7 @@ public: exporter.msvcTargetSuffix = ".dll"; exporter.msvcIsDLL = true; + exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", ""); exporter.makefileIsDLL = true; } diff --git a/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp b/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp index 18159bdd72..1491ab290d 100644 --- a/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp +++ b/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp @@ -640,7 +640,7 @@ public: DWORD dwsize1 = 0; DWORD dwsize2 = 0; - HRESULT hr = pInputBuffer->Lock ((DWORD) readOffset, (DWORD) bytesPerBuffer, + hr = pInputBuffer->Lock ((DWORD) readOffset, (DWORD) bytesPerBuffer, (void**) &buf1, &dwsize1, (void**) &buf2, &dwsize2, 0); @@ -753,9 +753,9 @@ public: String open (const BigInteger& inputChannels, const BigInteger& outputChannels, - double sampleRate, int bufferSizeSamples) override + double newSampleRate, int newBufferSize) override { - lastError = openDevice (inputChannels, outputChannels, sampleRate, bufferSizeSamples); + lastError = openDevice (inputChannels, outputChannels, newSampleRate, newBufferSize); isOpen_ = lastError.isEmpty(); return lastError; diff --git a/modules/juce_audio_devices/native/juce_win32_Midi.cpp b/modules/juce_audio_devices/native/juce_win32_Midi.cpp index abab612b5c..75069ab019 100644 --- a/modules/juce_audio_devices/native/juce_win32_Midi.cpp +++ b/modules/juce_audio_devices/native/juce_win32_Midi.cpp @@ -143,37 +143,37 @@ private: public: MidiHeader() {} - void prepare (HMIDIIN deviceHandle) + void prepare (HMIDIIN device) { zerostruct (hdr); hdr.lpData = data; hdr.dwBufferLength = (DWORD) numElementsInArray (data); - midiInPrepareHeader (deviceHandle, &hdr, sizeof (hdr)); + midiInPrepareHeader (device, &hdr, sizeof (hdr)); } - void unprepare (HMIDIIN deviceHandle) + void unprepare (HMIDIIN device) { if ((hdr.dwFlags & WHDR_DONE) != 0) { int c = 10; - while (--c >= 0 && midiInUnprepareHeader (deviceHandle, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING) + while (--c >= 0 && midiInUnprepareHeader (device, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING) Thread::sleep (20); jassert (c >= 0); } } - void write (HMIDIIN deviceHandle) + void write (HMIDIIN device) { hdr.dwBytesRecorded = 0; - midiInAddBuffer (deviceHandle, &hdr, sizeof (hdr)); + midiInAddBuffer (device, &hdr, sizeof (hdr)); } - void writeIfFinished (HMIDIIN deviceHandle) + void writeIfFinished (HMIDIIN device) { if ((hdr.dwFlags & WHDR_DONE) != 0) - write (deviceHandle); + write (device); } private: diff --git a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp index acff84b06a..1b2a4ad495 100644 --- a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp +++ b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp @@ -547,13 +547,13 @@ private: //============================================================================== ComSmartPtr createClient() { - ComSmartPtr client; + ComSmartPtr newClient; if (device != nullptr) logFailure (device->Activate (__uuidof (IAudioClient), CLSCTX_INPROC_SERVER, - nullptr, (void**) client.resetAndGetPointerAddress())); + nullptr, (void**) newClient.resetAndGetPointerAddress())); - return client; + return newClient; } struct AudioSampleFormat @@ -563,8 +563,8 @@ private: int bytesPerSampleContainer; }; - bool tryFormat (const AudioSampleFormat sampleFormat, IAudioClient* clientToUse, double sampleRate, - DWORD mixFormatChannelMask, WAVEFORMATEXTENSIBLE& format) const + bool tryFormat (const AudioSampleFormat sampleFormat, IAudioClient* clientToUse, double newSampleRate, + DWORD newMixFormatChannelMask, WAVEFORMATEXTENSIBLE& format) const { zerostruct (format); @@ -578,14 +578,14 @@ private: format.Format.cbSize = sizeof (WAVEFORMATEXTENSIBLE) - sizeof (WAVEFORMATEX); } - format.Format.nSamplesPerSec = (DWORD) sampleRate; + format.Format.nSamplesPerSec = (DWORD) newSampleRate; format.Format.nChannels = (WORD) numChannels; format.Format.wBitsPerSample = (WORD) (8 * sampleFormat.bytesPerSampleContainer); format.Samples.wValidBitsPerSample = (WORD) (sampleFormat.bitsPerSampleToTry); format.Format.nBlockAlign = (WORD) (format.Format.nChannels * format.Format.wBitsPerSample / 8); format.Format.nAvgBytesPerSec = (DWORD) (format.Format.nSamplesPerSec * format.Format.nBlockAlign); format.SubFormat = sampleFormat.useFloat ? KSDATAFORMAT_SUBTYPE_IEEE_FLOAT : KSDATAFORMAT_SUBTYPE_PCM; - format.dwChannelMask = mixFormatChannelMask; + format.dwChannelMask = newMixFormatChannelMask; WAVEFORMATEXTENSIBLE* nearestFormat = nullptr; @@ -605,8 +605,8 @@ private: return check (hr); } - bool findSupportedFormat (IAudioClient* clientToUse, double sampleRate, - DWORD mixFormatChannelMask, WAVEFORMATEXTENSIBLE& format) const + bool findSupportedFormat (IAudioClient* clientToUse, double newSampleRate, + DWORD newMixFormatChannelMask, WAVEFORMATEXTENSIBLE& format) const { static const AudioSampleFormat formats[] = { @@ -620,7 +620,7 @@ private: }; for (int i = 0; i < numElementsInArray (formats); ++i) - if (tryFormat (formats[i], clientToUse, sampleRate, mixFormatChannelMask, format)) + if (tryFormat (formats[i], clientToUse, newSampleRate, newMixFormatChannelMask, format)) return true; return false; @@ -1523,10 +1523,10 @@ private: } //============================================================================== - void scan (StringArray& outputDeviceNames, - StringArray& inputDeviceNames, - StringArray& outputDeviceIds, - StringArray& inputDeviceIds) + void scan (StringArray& outDeviceNames, + StringArray& inDeviceNames, + StringArray& outDeviceIds, + StringArray& inDeviceIds) { if (enumerator == nullptr) { @@ -1582,19 +1582,19 @@ private: if (flow == eRender) { const int index = (deviceId == defaultRenderer) ? 0 : -1; - outputDeviceIds.insert (index, deviceId); - outputDeviceNames.insert (index, name); + outDeviceIds.insert (index, deviceId); + outDeviceNames.insert (index, name); } else if (flow == eCapture) { const int index = (deviceId == defaultCapture) ? 0 : -1; - inputDeviceIds.insert (index, deviceId); - inputDeviceNames.insert (index, name); + inDeviceIds.insert (index, deviceId); + inDeviceNames.insert (index, name); } } - inputDeviceNames.appendNumbersToDuplicates (false, false); - outputDeviceNames.appendNumbersToDuplicates (false, false); + inDeviceNames.appendNumbersToDuplicates (false, false); + outDeviceNames.appendNumbersToDuplicates (false, false); } //============================================================================== diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index 924f8e4990..6d1f92af25 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -33,7 +33,7 @@ namespace OggVorbisNamespace #if JUCE_INCLUDE_OGGVORBIS_CODE || ! defined (JUCE_INCLUDE_OGGVORBIS_CODE) #if JUCE_MSVC #pragma warning (push) - #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365) + #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365 4456 4457 4459) #endif #if JUCE_CLANG diff --git a/modules/juce_audio_formats/codecs/oggvorbis/bitwise.c b/modules/juce_audio_formats/codecs/oggvorbis/bitwise.c index 710a5604ca..3f5244f444 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/bitwise.c +++ b/modules/juce_audio_formats/codecs/oggvorbis/bitwise.c @@ -15,6 +15,10 @@ ********************************************************************/ +#ifdef JUCE_MSVC + #pragma warning (disable: 4456 4457 4459) +#endif + /* We're 'LSb' endian; if we write a word but read individual bits, then we'll read the lsb first */ diff --git a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c index 644b852c86..68967f4bb7 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c +++ b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c @@ -15,6 +15,10 @@ ********************************************************************/ +#ifdef JUCE_MSVC + #pragma warning (disable: 4456 4457 4459) +#endif + #include #include #include diff --git a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/sharedbook.c b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/sharedbook.c index 2f27b8609b..2b5e76e23f 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/sharedbook.c +++ b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/sharedbook.c @@ -15,6 +15,10 @@ ********************************************************************/ +#ifdef JUCE_MSVC + #pragma warning (disable: 4456 4457 4459) +#endif + #include #include #include diff --git a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c index 79b668855c..83af2e8877 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c +++ b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c @@ -15,6 +15,10 @@ ********************************************************************/ +#ifdef JUCE_MSVC + #pragma warning (disable: 4456 4457 4459) +#endif + #include #include #include diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp index 924286d947..d4a672c7fe 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp @@ -860,7 +860,7 @@ AudioProcessorGraph::Node::Node (const uint32 nodeID, AudioProcessor* const p) n jassert (processor != nullptr); } -void AudioProcessorGraph::Node::prepare (const double sampleRate, const int blockSize, +void AudioProcessorGraph::Node::prepare (const double newSampleRate, const int newBlockSize, AudioProcessorGraph* const graph) { if (! isPrepared) @@ -870,9 +870,9 @@ void AudioProcessorGraph::Node::prepare (const double sampleRate, const int bloc processor->setPlayConfigDetails (processor->getNumInputChannels(), processor->getNumOutputChannels(), - sampleRate, blockSize); + newSampleRate, newBlockSize); - processor->prepareToPlay (sampleRate, blockSize); + processor->prepareToPlay (newSampleRate, newBlockSize); } } diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h index 5662be61a3..5ffba3c638 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h @@ -92,7 +92,7 @@ public: Node (uint32 nodeId, AudioProcessor*) noexcept; void setParentGraph (AudioProcessorGraph*) const; - void prepare (double sampleRate, int blockSize, AudioProcessorGraph*); + void prepare (double newSampleRate, int newBlockSize, AudioProcessorGraph*); void unprepare(); JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Node) @@ -306,7 +306,7 @@ public: const String getName() const override; void fillInPluginDescription (PluginDescription&) const override; - void prepareToPlay (double sampleRate, int estimatedSamplesPerBlock) override; + void prepareToPlay (double newSampleRate, int estimatedSamplesPerBlock) override; void releaseResources() override; void processBlock (AudioSampleBuffer&, MidiBuffer&) override; diff --git a/modules/juce_core/juce_core.cpp b/modules/juce_core/juce_core.cpp index d5ad9300d8..01d2381c8d 100644 --- a/modules/juce_core/juce_core.cpp +++ b/modules/juce_core/juce_core.cpp @@ -59,7 +59,10 @@ #include #if ! JUCE_MINGW + #pragma warning (push) + #pragma warning (disable: 4091) #include + #pragma warning (pop) #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES #pragma comment (lib, "DbgHelp.lib") diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h index c0b07bdbb1..9e0b1401bf 100644 --- a/modules/juce_core/native/juce_BasicNativeHeaders.h +++ b/modules/juce_core/native/juce_BasicNativeHeaders.h @@ -80,8 +80,7 @@ #error "You're compiling without exceptions enabled! This is needed for a lot of JUCE classes, please update your compiler settings!" #endif - #pragma warning (push) - #pragma warning (disable : 4100 4201 4514 4312 4995) + #pragma warning (push, 0) // disable all warnings whilst including system headers #endif #define STRICT 1 diff --git a/modules/juce_core/native/juce_win32_Files.cpp b/modules/juce_core/native/juce_win32_Files.cpp index 143ea9e1bf..c3684f19e5 100644 --- a/modules/juce_core/native/juce_win32_Files.cpp +++ b/modules/juce_core/native/juce_win32_Files.cpp @@ -292,12 +292,12 @@ void FileOutputStream::closeHandle() CloseHandle ((HANDLE) fileHandle); } -ssize_t FileOutputStream::writeInternal (const void* buffer, size_t numBytes) +ssize_t FileOutputStream::writeInternal (const void* bufferToWrite, size_t numBytes) { if (fileHandle != nullptr) { DWORD actualNum = 0; - if (! WriteFile ((HANDLE) fileHandle, buffer, (DWORD) numBytes, &actualNum, 0)) + if (! WriteFile ((HANDLE) fileHandle, bufferToWrite, (DWORD) numBytes, &actualNum, 0)) status = WindowsFileHelpers::getResultForLastError(); return (ssize_t) actualNum; diff --git a/modules/juce_core/native/juce_win32_Network.cpp b/modules/juce_core/native/juce_win32_Network.cpp index baf9957be0..d471e11430 100644 --- a/modules/juce_core/native/juce_win32_Network.cpp +++ b/modules/juce_core/native/juce_win32_Network.cpp @@ -52,7 +52,7 @@ public: if (! isError()) { DWORD bufferSizeBytes = 4096; - StringPairArray headers (false); + StringPairArray dataHeaders (false); for (;;) { @@ -68,8 +68,8 @@ public: const String& header = headersArray[i]; const String key (header.upToFirstOccurrenceOf (": ", false, false)); const String value (header.fromFirstOccurrenceOf (": ", false, false)); - const String previousValue (headers[key]); - headers.set (key, previousValue.isEmpty() ? value : (previousValue + "," + value)); + const String previousValue (dataHeaders[key]); + dataHeaders.set (key, previousValue.isEmpty() ? value : (previousValue + "," + value)); } break; @@ -91,7 +91,7 @@ public: if (numRedirectsToFollow >= 0 && (statusCode == 301 || statusCode == 302 || statusCode == 303 || statusCode == 307)) { - String newLocation (headers["Location"]); + String newLocation (dataHeaders["Location"]); // Check whether location is a relative URI - this is an incomplete test for relative path, // but we'll use it for now (valid protocols for this implementation are http, https & ftp) @@ -114,7 +114,7 @@ public: } if (responseHeaders != nullptr) - responseHeaders->addArray (headers); + responseHeaders->addArray (dataHeaders); } break; diff --git a/modules/juce_core/native/juce_win32_Threads.cpp b/modules/juce_core/native/juce_win32_Threads.cpp index a7baf441fb..03ed62cd34 100644 --- a/modules/juce_core/native/juce_win32_Threads.cpp +++ b/modules/juce_core/native/juce_win32_Threads.cpp @@ -110,7 +110,7 @@ void Thread::launchThread() { unsigned int newThreadId; threadHandle = (void*) _beginthreadex (0, 0, &threadEntryProc, this, 0, &newThreadId); - threadId = (ThreadID) newThreadId; + threadId = (ThreadID) (pointer_sized_int) newThreadId; } void Thread::closeThreadHandle() diff --git a/modules/juce_core/time/juce_Time.cpp b/modules/juce_core/time/juce_Time.cpp index f28522c052..4952139438 100644 --- a/modules/juce_core/time/juce_Time.cpp +++ b/modules/juce_core/time/juce_Time.cpp @@ -64,19 +64,14 @@ namespace TimeHelpers { time_t now = static_cast (seconds); - #if JUCE_WINDOWS - #ifdef _INC_TIME_INL + #if JUCE_WINDOWS if (now >= 0 && now <= 0x793406fff) localtime_s (&result, &now); else zerostruct (result); #else - result = *localtime (&now); - #endif - #else - localtime_r (&now, &result); // more thread-safe - #endif + #endif } return result; @@ -195,19 +190,15 @@ Time& Time::operator= (const Time& other) noexcept //============================================================================== int64 Time::currentTimeMillis() noexcept { - #if JUCE_WINDOWS + #if JUCE_WINDOWS struct _timeb t; - #ifdef _INC_TIME_INL _ftime_s (&t); - #else - _ftime (&t); - #endif return ((int64) t.time) * 1000 + t.millitm; - #else + #else struct timeval tv; gettimeofday (&tv, nullptr); return ((int64) tv.tv_sec) * 1000 + tv.tv_usec / 1000; - #endif + #endif } Time JUCE_CALLTYPE Time::getCurrentTime() noexcept @@ -364,7 +355,6 @@ String Time::getTimeZone() const noexcept #if JUCE_MSVC _tzset(); - #ifdef _INC_TIME_INL for (int i = 0; i < 2; ++i) { char name[128] = { 0 }; @@ -372,11 +362,6 @@ String Time::getTimeZone() const noexcept _get_tzname (&length, name, 127, i); zone[i] = name; } - #else - const char** const zonePtr = (const char**) _tzname; - zone[0] = zonePtr[0]; - zone[1] = zonePtr[1]; - #endif #else #if JUCE_MINGW #warning "Can't find a replacement for tzset on mingw - ideas welcome!" diff --git a/modules/juce_events/broadcasters/juce_ChangeBroadcaster.cpp b/modules/juce_events/broadcasters/juce_ChangeBroadcaster.cpp index 8f71c3bbf7..a17c673815 100644 --- a/modules/juce_events/broadcasters/juce_ChangeBroadcaster.cpp +++ b/modules/juce_events/broadcasters/juce_ChangeBroadcaster.cpp @@ -24,7 +24,7 @@ ChangeBroadcaster::ChangeBroadcaster() noexcept { - callback.owner = this; + broadcastCallback.owner = this; } ChangeBroadcaster::~ChangeBroadcaster() @@ -61,7 +61,7 @@ void ChangeBroadcaster::removeAllChangeListeners() void ChangeBroadcaster::sendChangeMessage() { if (changeListeners.size() > 0) - callback.triggerAsyncUpdate(); + broadcastCallback.triggerAsyncUpdate(); } void ChangeBroadcaster::sendSynchronousChangeMessage() @@ -69,13 +69,13 @@ void ChangeBroadcaster::sendSynchronousChangeMessage() // This can only be called by the event thread. jassert (MessageManager::getInstance()->isThisTheMessageThread()); - callback.cancelPendingUpdate(); + broadcastCallback.cancelPendingUpdate(); callListeners(); } void ChangeBroadcaster::dispatchPendingMessages() { - callback.handleUpdateNowIfNeeded(); + broadcastCallback.handleUpdateNowIfNeeded(); } void ChangeBroadcaster::callListeners() diff --git a/modules/juce_events/broadcasters/juce_ChangeBroadcaster.h b/modules/juce_events/broadcasters/juce_ChangeBroadcaster.h index 8eb4da36ad..a74070883e 100644 --- a/modules/juce_events/broadcasters/juce_ChangeBroadcaster.h +++ b/modules/juce_events/broadcasters/juce_ChangeBroadcaster.h @@ -93,7 +93,7 @@ private: }; friend class ChangeBroadcasterCallback; - ChangeBroadcasterCallback callback; + ChangeBroadcasterCallback broadcastCallback; ListenerList changeListeners; void callListeners(); diff --git a/modules/juce_events/native/juce_win32_HiddenMessageWindow.h b/modules/juce_events/native/juce_win32_HiddenMessageWindow.h index 1a859c0528..b629eba6af 100644 --- a/modules/juce_events/native/juce_win32_HiddenMessageWindow.h +++ b/modules/juce_events/native/juce_win32_HiddenMessageWindow.h @@ -63,7 +63,7 @@ private: ATOM atom; HWND hwnd; - LPCTSTR getClassNameFromAtom() noexcept { return (LPCTSTR) MAKELONG (atom, 0); } + LPCTSTR getClassNameFromAtom() noexcept { return (LPCTSTR) atom; } }; //============================================================================== diff --git a/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp b/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp index ca74b901a7..1ce92329e3 100644 --- a/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp +++ b/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp @@ -75,10 +75,10 @@ namespace DirectWriteTypeLayout if (currentLine >= layout->getNumLines()) { jassert (currentLine == layout->getNumLines()); - TextLayout::Line* const newLine = new TextLayout::Line(); - layout->addLine (newLine); + TextLayout::Line* const line = new TextLayout::Line(); + layout->addLine (line); - newLine->lineOrigin = Point (baselineOriginX, baselineOriginY); + line->lineOrigin = Point (baselineOriginX, baselineOriginY); } } diff --git a/modules/juce_graphics/native/juce_win32_Fonts.cpp b/modules/juce_graphics/native/juce_win32_Fonts.cpp index dc54efec0b..db57fd1980 100644 --- a/modules/juce_graphics/native/juce_win32_Fonts.cpp +++ b/modules/juce_graphics/native/juce_win32_Fonts.cpp @@ -542,22 +542,22 @@ private: } } - void createKerningPairs (HDC dc, const float height) + void createKerningPairs (HDC hdc, const float height) { HeapBlock rawKerning; - const DWORD numKPs = GetKerningPairs (dc, 0, 0); + const DWORD numKPs = GetKerningPairs (hdc, 0, 0); rawKerning.calloc (numKPs); - GetKerningPairs (dc, numKPs, rawKerning); + GetKerningPairs (hdc, numKPs, rawKerning); kerningPairs.ensureStorageAllocated ((int) numKPs); for (DWORD i = 0; i < numKPs; ++i) { KerningPair kp; - kp.glyph1 = getGlyphForChar (dc, rawKerning[i].wFirst); - kp.glyph2 = getGlyphForChar (dc, rawKerning[i].wSecond); + kp.glyph1 = getGlyphForChar (hdc, rawKerning[i].wFirst); + kp.glyph2 = getGlyphForChar (hdc, rawKerning[i].wSecond); - const int standardWidth = getGlyphWidth (dc, kp.glyph1); + const int standardWidth = getGlyphWidth (hdc, kp.glyph1); kp.kerning = (standardWidth + rawKerning[i].iKernAmount) / height; kerningPairs.add (kp); @@ -587,7 +587,7 @@ private: return gm.gmCellIncX; } - float getKerning (HDC dc, const int glyph1, const int glyph2) + float getKerning (HDC hdc, const int glyph1, const int glyph2) { KerningPair kp; kp.glyph1 = glyph1; @@ -602,7 +602,7 @@ private: if (index < 0) { kp.glyph2 = -1; - kp.kerning = getGlyphWidth (dc, kp.glyph1) / (float) tm.tmHeight; + kp.kerning = getGlyphWidth (hdc, kp.glyph1) / (float) tm.tmHeight; kerningPairs.add (kp); return kp.kerning; } diff --git a/modules/juce_gui_basics/drawables/juce_DrawablePath.cpp b/modules/juce_gui_basics/drawables/juce_DrawablePath.cpp index bb1b7ff807..19a2d4dfeb 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawablePath.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawablePath.cpp @@ -88,11 +88,11 @@ public: bool ok = true; jassert (owner.relativePath != nullptr); - const RelativePointPath& path = *owner.relativePath; + const RelativePointPath& relPath = *owner.relativePath; - for (int i = 0; i < path.elements.size(); ++i) + for (int i = 0; i < relPath.elements.size(); ++i) { - RelativePointPath::ElementBase* const e = path.elements.getUnchecked(i); + RelativePointPath::ElementBase* const e = relPath.elements.getUnchecked(i); int numPoints; RelativePoint* const points = e->getControlPoints (numPoints); diff --git a/modules/juce_gui_basics/drawables/juce_DrawablePath.h b/modules/juce_gui_basics/drawables/juce_DrawablePath.h index 34842ec141..a06ea43495 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawablePath.h +++ b/modules/juce_gui_basics/drawables/juce_DrawablePath.h @@ -123,8 +123,8 @@ public: ValueTree getPathState(); - void readFrom (const RelativePointPath& path, UndoManager* undoManager); - void writeTo (RelativePointPath& path) const; + void readFrom (const RelativePointPath& relativePath, UndoManager* undoManager); + void writeTo (RelativePointPath& relativePath) const; static const Identifier nonZeroWinding, point1, point2, point3; }; diff --git a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h index e2a55cd6f4..30fb4fe331 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h @@ -85,7 +85,7 @@ private: int getNumRows() override; void paintListBoxItem (int, Graphics&, int, int, bool) override; Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component*) override; - void selectedRowsChanged (int lastRowSelected) override; + void selectedRowsChanged (int row) override; void deleteKeyPressed (int currentSelectedRow) override; void returnKeyPressed (int currentSelectedRow) override; diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index ce986a392d..a9baee0c7f 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -1224,7 +1224,7 @@ private: clearSingletonInstance(); } - LPCTSTR getWindowClassName() const noexcept { return (LPCTSTR) MAKELONG (atom, 0); } + LPCTSTR getWindowClassName() const noexcept { return (LPCTSTR) atom; } juce_DeclareSingleton_SingleThreaded_Minimal (WindowClassHolder) @@ -3280,13 +3280,13 @@ String SystemClipboard::getTextFromClipboard() } //============================================================================== -void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDisable, bool /*allowMenusAndBars*/) +void Desktop::setKioskComponent (Component* kioskModeComp, bool enableOrDisable, bool /*allowMenusAndBars*/) { - if (TopLevelWindow* tlw = dynamic_cast (kioskModeComponent)) + if (TopLevelWindow* tlw = dynamic_cast (kioskModeComp)) tlw->setUsingNativeTitleBar (! enableOrDisable); if (enableOrDisable) - kioskModeComponent->setBounds (getDisplays().getMainDisplay().totalArea); + kioskModeComp->setBounds (getDisplays().getMainDisplay().totalArea); } //============================================================================== diff --git a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h index 2febd310d0..bf9047c52a 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h +++ b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h @@ -40,8 +40,8 @@ public: void componentMovedOrResized (Component&, bool, bool); void componentParentHierarchyChanged (Component&); - void componentChildrenChanged (Component& component); - void componentBeingDeleted (Component& component); + void componentChildrenChanged (Component&); + void componentBeingDeleted (Component&); void markersChanged (MarkerList*); void markerListBeingDeleted (MarkerList* markerList); diff --git a/modules/juce_gui_basics/widgets/juce_TableListBox.h b/modules/juce_gui_basics/widgets/juce_TableListBox.h index de7d25cc68..ddfb6b7c1f 100644 --- a/modules/juce_gui_basics/widgets/juce_TableListBox.h +++ b/modules/juce_gui_basics/widgets/juce_TableListBox.h @@ -309,7 +309,7 @@ public: /** @internal */ Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component* existingComponentToUpdate) override; /** @internal */ - void selectedRowsChanged (int lastRowSelected) override; + void selectedRowsChanged (int row) override; /** @internal */ void deleteKeyPressed (int currentSelectedRow) override; /** @internal */ diff --git a/modules/juce_gui_basics/windows/juce_CallOutBox.h b/modules/juce_gui_basics/windows/juce_CallOutBox.h index 51afa275cc..6ff5990b0d 100644 --- a/modules/juce_gui_basics/windows/juce_CallOutBox.h +++ b/modules/juce_gui_basics/windows/juce_CallOutBox.h @@ -139,7 +139,7 @@ public: { virtual ~LookAndFeelMethods() {} - virtual void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image& cachedImage) = 0; + virtual void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image&) = 0; virtual int getCallOutBoxBorderSize (const CallOutBox&) = 0; }; diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.h b/modules/juce_gui_basics/windows/juce_ResizableWindow.h index 7305d41572..aff66092ea 100644 --- a/modules/juce_gui_basics/windows/juce_ResizableWindow.h +++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.h @@ -164,7 +164,7 @@ public: with the current constrainer. @see setConstrainer */ - void setBoundsConstrained (const Rectangle& bounds); + void setBoundsConstrained (const Rectangle& newBounds); //============================================================================== diff --git a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h index 50fcf7835b..fe24c3120b 100644 --- a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h +++ b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h @@ -123,7 +123,7 @@ public: Thread::startThread() for values @returns true if the thread finished normally; false if the user pressed cancel */ - bool runThread (int threadPriority = 5); + bool runThread (int priority = 5); #endif /** Starts the thread and returns. @@ -135,7 +135,7 @@ public: @param threadPriority the priority to use when starting the thread - see Thread::startThread() for values */ - void launchThread (int threadPriority = 5); + void launchThread (int priority = 5); /** The thread should call this periodically to update the position of the progress bar. diff --git a/modules/juce_gui_extra/code_editor/juce_CodeDocument.h b/modules/juce_gui_extra/code_editor/juce_CodeDocument.h index 6b22116249..80b416dbe1 100644 --- a/modules/juce_gui_extra/code_editor/juce_CodeDocument.h +++ b/modules/juce_gui_extra/code_editor/juce_CodeDocument.h @@ -125,7 +125,7 @@ public: Lines are numbered from zero, and if the line or index are beyond the bounds of the document, they will be adjusted to keep them within its limits. */ - void setLineAndIndex (int newLine, int newIndexInLine); + void setLineAndIndex (int newLineNumber, int newIndexInLine); /** Returns the line number of this position. The first line in the document is numbered zero, not one! @@ -257,7 +257,7 @@ public: The string must be either "\n", "\r\n", or (rarely) "\r". @see getNewLineCharacters */ - void setNewLineCharacters (const String& newLine) noexcept; + void setNewLineCharacters (const String& newLineCharacters) noexcept; //============================================================================== /** Begins a new undo transaction. diff --git a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp index 1021459390..2d2555707c 100644 --- a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp @@ -225,10 +225,10 @@ public: storage->Release(); } - void setControlBounds (const Rectangle& bounds) const + void setControlBounds (const Rectangle& newBounds) const { if (controlHWND != 0) - MoveWindow (controlHWND, bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight(), TRUE); + MoveWindow (controlHWND, newBounds.getX(), newBounds.getY(), newBounds.getWidth(), newBounds.getHeight(), TRUE); } void setControlVisible (bool shouldBeVisible) const @@ -332,7 +332,7 @@ bool ActiveXControlComponent::createControl (const void* controlIID) if (ComponentPeer* const peer = getPeer()) { - const Rectangle bounds (peer->getAreaCoveredBy (*this)); + const Rectangle controlBounds (peer->getAreaCoveredBy (*this)); HWND hwnd = (HWND) peer->getNativeHandle(); @@ -348,10 +348,10 @@ bool ActiveXControlComponent::createControl (const void* controlIID) if (OleSetContainedObject (newControl->control, TRUE) == S_OK) { RECT rect; - rect.left = bounds.getX(); - rect.top = bounds.getY(); - rect.right = bounds.getRight(); - rect.bottom = bounds.getBottom(); + rect.left = controlBounds.getX(); + rect.top = controlBounds.getY(); + rect.right = controlBounds.getRight(); + rect.bottom = controlBounds.getBottom(); if (newControl->control->DoVerb (OLEIVERB_SHOW, 0, newControl->clientSite, 0, hwnd, &rect) == S_OK) { @@ -360,7 +360,7 @@ bool ActiveXControlComponent::createControl (const void* controlIID) if (control->controlHWND != 0) { - control->setControlBounds (bounds); + control->setControlBounds (controlBounds); control->originalWndProc = (WNDPROC) GetWindowLongPtr ((HWND) control->controlHWND, GWLP_WNDPROC); SetWindowLongPtr ((HWND) control->controlHWND, GWLP_WNDPROC, (LONG_PTR) Pimpl::activeXHookWndProc); diff --git a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp index ac408ca7cc..0b9ec01d38 100644 --- a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp @@ -71,8 +71,8 @@ public: { LPSAFEARRAY sa = nullptr; - VARIANT flags, frame, postDataVar, headersVar; // (_variant_t isn't available in all compilers) - VariantInit (&flags); + VARIANT headerFlags, frame, postDataVar, headersVar; // (_variant_t isn't available in all compilers) + VariantInit (&headerFlags); VariantInit (&frame); VariantInit (&postDataVar); VariantInit (&headersVar); @@ -109,12 +109,12 @@ public: } browser->Navigate ((BSTR) (const OLECHAR*) url.toWideCharPointer(), - &flags, &frame, &postDataVar, &headersVar); + &headerFlags, &frame, &postDataVar, &headersVar); if (sa != nullptr) SafeArrayDestroy (sa); - VariantClear (&flags); + VariantClear (&headerFlags); VariantClear (&frame); VariantClear (&postDataVar); VariantClear (&headersVar); diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index 4957338583..7e3f23f6b0 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -570,7 +570,7 @@ private: { Component& comp = *getComponent(); CachedImage* const newCachedImage = new CachedImage (context, comp, - context.pixelFormat, + context.openGLPixelFormat, context.contextToShareWith); comp.setCachedComponentImage (newCachedImage); newCachedImage->start(); // (must wait until this is attached before starting its thread) @@ -647,7 +647,7 @@ void OpenGLContext::setPixelFormat (const OpenGLPixelFormat& preferredPixelForma // Call it before attaching your context, or use detach() first, before calling this! jassert (nativeContext == nullptr); - pixelFormat = preferredPixelFormat; + openGLPixelFormat = preferredPixelFormat; } void OpenGLContext::setNativeSharedContext (void* nativeContextToShareWith) noexcept diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.h b/modules/juce_opengl/opengl/juce_OpenGLContext.h index 095152495d..b30d23cb32 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.h +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.h @@ -280,7 +280,7 @@ private: OpenGLRenderer* renderer; double currentRenderScale; ScopedPointer attachment; - OpenGLPixelFormat pixelFormat; + OpenGLPixelFormat openGLPixelFormat; void* contextToShareWith; OpenGLVersion versionRequired; size_t imageCacheMaxSize;