| @@ -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())); | |||
| } | |||
| } | |||
| } | |||
| @@ -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; | |||
| } | |||
| @@ -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; | |||
| @@ -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: | |||
| @@ -547,13 +547,13 @@ private: | |||
| //============================================================================== | |||
| ComSmartPtr<IAudioClient> createClient() | |||
| { | |||
| ComSmartPtr<IAudioClient> client; | |||
| ComSmartPtr<IAudioClient> 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); | |||
| } | |||
| //============================================================================== | |||
| @@ -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 | |||
| @@ -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 */ | |||
| @@ -15,6 +15,10 @@ | |||
| ********************************************************************/ | |||
| #ifdef JUCE_MSVC | |||
| #pragma warning (disable: 4456 4457 4459) | |||
| #endif | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #include <math.h> | |||
| @@ -15,6 +15,10 @@ | |||
| ********************************************************************/ | |||
| #ifdef JUCE_MSVC | |||
| #pragma warning (disable: 4456 4457 4459) | |||
| #endif | |||
| #include <stdlib.h> | |||
| #include <math.h> | |||
| #include <string.h> | |||
| @@ -15,6 +15,10 @@ | |||
| ********************************************************************/ | |||
| #ifdef JUCE_MSVC | |||
| #pragma warning (disable: 4456 4457 4459) | |||
| #endif | |||
| #include <stdlib.h> | |||
| #include <stdio.h> | |||
| #include <errno.h> | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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; | |||
| @@ -59,7 +59,10 @@ | |||
| #include <ws2tcpip.h> | |||
| #if ! JUCE_MINGW | |||
| #pragma warning (push) | |||
| #pragma warning (disable: 4091) | |||
| #include <Dbghelp.h> | |||
| #pragma warning (pop) | |||
| #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES | |||
| #pragma comment (lib, "DbgHelp.lib") | |||
| @@ -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 | |||
| @@ -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; | |||
| @@ -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; | |||
| @@ -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() | |||
| @@ -64,19 +64,14 @@ namespace TimeHelpers | |||
| { | |||
| time_t now = static_cast <time_t> (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!" | |||
| @@ -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() | |||
| @@ -93,7 +93,7 @@ private: | |||
| }; | |||
| friend class ChangeBroadcasterCallback; | |||
| ChangeBroadcasterCallback callback; | |||
| ChangeBroadcasterCallback broadcastCallback; | |||
| ListenerList <ChangeListener> changeListeners; | |||
| void callListeners(); | |||
| @@ -63,7 +63,7 @@ private: | |||
| ATOM atom; | |||
| HWND hwnd; | |||
| LPCTSTR getClassNameFromAtom() noexcept { return (LPCTSTR) MAKELONG (atom, 0); } | |||
| LPCTSTR getClassNameFromAtom() noexcept { return (LPCTSTR) atom; } | |||
| }; | |||
| //============================================================================== | |||
| @@ -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<float> (baselineOriginX, baselineOriginY); | |||
| line->lineOrigin = Point<float> (baselineOriginX, baselineOriginY); | |||
| } | |||
| } | |||
| @@ -542,22 +542,22 @@ private: | |||
| } | |||
| } | |||
| void createKerningPairs (HDC dc, const float height) | |||
| void createKerningPairs (HDC hdc, const float height) | |||
| { | |||
| HeapBlock<KERNINGPAIR> 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; | |||
| } | |||
| @@ -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); | |||
| @@ -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; | |||
| }; | |||
| @@ -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; | |||
| @@ -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<TopLevelWindow*> (kioskModeComponent)) | |||
| if (TopLevelWindow* tlw = dynamic_cast<TopLevelWindow*> (kioskModeComp)) | |||
| tlw->setUsingNativeTitleBar (! enableOrDisable); | |||
| if (enableOrDisable) | |||
| kioskModeComponent->setBounds (getDisplays().getMainDisplay().totalArea); | |||
| kioskModeComp->setBounds (getDisplays().getMainDisplay().totalArea); | |||
| } | |||
| //============================================================================== | |||
| @@ -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); | |||
| @@ -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 */ | |||
| @@ -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; | |||
| }; | |||
| @@ -164,7 +164,7 @@ public: | |||
| with the current constrainer. | |||
| @see setConstrainer | |||
| */ | |||
| void setBoundsConstrained (const Rectangle<int>& bounds); | |||
| void setBoundsConstrained (const Rectangle<int>& newBounds); | |||
| //============================================================================== | |||
| @@ -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. | |||
| @@ -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. | |||
| @@ -225,10 +225,10 @@ public: | |||
| storage->Release(); | |||
| } | |||
| void setControlBounds (const Rectangle<int>& bounds) const | |||
| void setControlBounds (const Rectangle<int>& 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<int> bounds (peer->getAreaCoveredBy (*this)); | |||
| const Rectangle<int> 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); | |||
| @@ -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); | |||
| @@ -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 | |||
| @@ -280,7 +280,7 @@ private: | |||
| OpenGLRenderer* renderer; | |||
| double currentRenderScale; | |||
| ScopedPointer<Attachment> attachment; | |||
| OpenGLPixelFormat pixelFormat; | |||
| OpenGLPixelFormat openGLPixelFormat; | |||
| void* contextToShareWith; | |||
| OpenGLVersion versionRequired; | |||
| size_t imageCacheMaxSize; | |||