diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 99685f23ef..7b097c3a78 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -5037,9 +5037,11 @@ public: static Constant* findTermToAdjust (Term* const term, const bool mustBeFlagged) { - Constant* c = dynamic_cast (term); - if (c != 0 && (c->isResolutionTarget || ! mustBeFlagged)) - return c; + { + Constant* c = dynamic_cast (term); + if (c != 0 && (c->isResolutionTarget || ! mustBeFlagged)) + return c; + } if (dynamic_cast (term) != 0) return 0; @@ -9441,17 +9443,17 @@ InputStream* URL::createInputStream (const bool usePostCommand, StringPairArray* const responseHeaders) const { String headers; - MemoryBlock postData; + MemoryBlock headersAndPostData; if (usePostCommand) - URLHelpers::createHeadersAndPostData (*this, headers, postData); + URLHelpers::createHeadersAndPostData (*this, headers, headersAndPostData); headers += extraHeaders; if (! headers.endsWithChar ('\n')) headers << "\r\n"; - return createNativeStream (toString (! usePostCommand), usePostCommand, postData, + return createNativeStream (toString (! usePostCommand), usePostCommand, headersAndPostData, progressCallback, progressCallbackContext, headers, timeOutMs, responseHeaders); } @@ -21339,9 +21341,9 @@ class AudioFormatWriter::ThreadedWriter::Buffer : public TimeSliceClient, public AbstractFifo { public: - Buffer (TimeSliceThread& timeSliceThread_, AudioFormatWriter* writer_, int numChannels, int bufferSize) - : AbstractFifo (bufferSize), - buffer (numChannels, bufferSize), + Buffer (TimeSliceThread& timeSliceThread_, AudioFormatWriter* writer_, int numChannels, int bufferSize_) + : AbstractFifo (bufferSize_), + buffer (numChannels, bufferSize_), timeSliceThread (timeSliceThread_), writer (writer_), thumbnailToUpdate (0), @@ -22358,7 +22360,7 @@ void AudioThumbnail::addBlock (const int64 startSample, const AudioSampleBuffer& for (int chan = 0; chan < numChans; ++chan) { - const float* const source = incoming.getSampleData (chan, startOffsetInBuffer); + const float* const sourceData = incoming.getSampleData (chan, startOffsetInBuffer); MinMaxValue* const dest = thumbData + numToDo * chan; thumbChannels [chan] = dest; @@ -22366,7 +22368,7 @@ void AudioThumbnail::addBlock (const int64 startSample, const AudioSampleBuffer& { float low, high; const int start = i * samplesPerThumbSample; - findMinAndMax (source + start, jmin (samplesPerThumbSample, numSamples - start), low, high); + findMinAndMax (sourceData + start, jmin (samplesPerThumbSample, numSamples - start), low, high); dest[i].setFloat (low, high); } } @@ -25700,21 +25702,21 @@ void AudioDeviceManager::addAudioCallback (AudioIODeviceCallback* newCallback) callbacks.add (newCallback); } -void AudioDeviceManager::removeAudioCallback (AudioIODeviceCallback* callback) +void AudioDeviceManager::removeAudioCallback (AudioIODeviceCallback* callbackToRemove) { - if (callback != 0) + if (callbackToRemove != 0) { bool needsDeinitialising = currentAudioDevice != 0; { const ScopedLock sl (audioCallbackLock); - needsDeinitialising = needsDeinitialising && callbacks.contains (callback); - callbacks.removeValue (callback); + needsDeinitialising = needsDeinitialising && callbacks.contains (callbackToRemove); + callbacks.removeValue (callbackToRemove); } if (needsDeinitialising) - callback->audioDeviceStopped(); + callbackToRemove->audioDeviceStopped(); } } @@ -25880,13 +25882,13 @@ bool AudioDeviceManager::isMidiInputEnabled (const String& name) const } void AudioDeviceManager::addMidiInputCallback (const String& name, - MidiInputCallback* callback) + MidiInputCallback* callbackToAdd) { - removeMidiInputCallback (name, callback); + removeMidiInputCallback (name, callbackToAdd); if (name.isEmpty()) { - midiCallbacks.add (callback); + midiCallbacks.add (callbackToAdd); midiCallbackDevices.add (0); } else @@ -25896,7 +25898,7 @@ void AudioDeviceManager::addMidiInputCallback (const String& name, if (enabledMidiInputs[i]->getName() == name) { const ScopedLock sl (midiCallbackLock); - midiCallbacks.add (callback); + midiCallbacks.add (callbackToAdd); midiCallbackDevices.add (enabledMidiInputs[i]); break; } @@ -25904,8 +25906,7 @@ void AudioDeviceManager::addMidiInputCallback (const String& name, } } -void AudioDeviceManager::removeMidiInputCallback (const String& name, - MidiInputCallback* /*callback*/) +void AudioDeviceManager::removeMidiInputCallback (const String& name, MidiInputCallback* /*callback*/) { const ScopedLock sl (midiCallbackLock); @@ -37342,7 +37343,7 @@ void AudioProcessorPlayer::audioDeviceIOCallback (const float** const inputChann if (processor != 0) { - const ScopedLock sl (processor->getCallbackLock()); + const ScopedLock sl2 (processor->getCallbackLock()); if (processor->isSuspended()) { @@ -39653,18 +39654,20 @@ public: static void sendWheelEvent (Component& comp, BailOutChecker& checker, const MouseEvent& e, const float wheelIncrementX, const float wheelIncrementY) { - MouseListenerList* const list = comp.mouseListeners; - - if (list != 0) { - for (int i = list->listeners.size(); --i >= 0;) + MouseListenerList* const list = comp.mouseListeners; + + if (list != 0) { - list->listeners.getUnchecked(i)->mouseWheelMove (e, wheelIncrementX, wheelIncrementY); + for (int i = list->listeners.size(); --i >= 0;) + { + list->listeners.getUnchecked(i)->mouseWheelMove (e, wheelIncrementX, wheelIncrementY); - if (checker.shouldBailOut()) - return; + if (checker.shouldBailOut()) + return; - i = jmin (i, list->listeners.size()); + i = jmin (i, list->listeners.size()); + } } } @@ -41036,7 +41039,7 @@ int Component::runModalLoop() return ModalComponentManager::getInstance()->runEventLoopForCurrentComponent(); } -void Component::enterModalState (const bool takeKeyboardFocus, ModalComponentManager::Callback* const callback) +void Component::enterModalState (const bool shouldTakeKeyboardFocus, ModalComponentManager::Callback* const callback) { // if component methods are being called from threads other than the message // thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe. @@ -41052,7 +41055,7 @@ void Component::enterModalState (const bool takeKeyboardFocus, ModalComponentMan flags.currentlyModalFlag = true; setVisible (true); - if (takeKeyboardFocus) + if (shouldTakeKeyboardFocus) grabKeyboardFocus(); } } @@ -44865,7 +44868,7 @@ bool CodeDocument::Position::operator!= (const Position& other) const throw() return ! operator== (other); } -void CodeDocument::Position::setLineAndIndex (const int newLine, const int newIndexInLine) +void CodeDocument::Position::setLineAndIndex (const int newLineNum, const int newIndexInLine) { jassert (owner != 0); @@ -44877,7 +44880,7 @@ void CodeDocument::Position::setLineAndIndex (const int newLine, const int newIn } else { - if (newLine >= owner->lines.size()) + if (newLineNum >= owner->lines.size()) { line = owner->lines.size() - 1; @@ -44889,7 +44892,7 @@ void CodeDocument::Position::setLineAndIndex (const int newLine, const int newIn } else { - line = jmax (0, newLine); + line = jmax (0, newLineNum); CodeDocumentLine* const l = owner->lines.getUnchecked (line); jassert (l != 0); @@ -45147,10 +45150,10 @@ bool CodeDocument::writeToStream (OutputStream& stream) return true; } -void CodeDocument::setNewLineCharacters (const String& newLine) throw() +void CodeDocument::setNewLineCharacters (const String& newLineChars_) throw() { - jassert (newLine == "\r\n" || newLine == "\n" || newLine == "\r"); - newLineChars = newLine; + jassert (newLineChars_ == "\r\n" || newLineChars_ == "\n" || newLineChars_ == "\r"); + newLineChars = newLineChars_; } void CodeDocument::newTransaction() @@ -62157,7 +62160,7 @@ void MarkerList::markersHaveChanged() listeners.call (&MarkerList::Listener::markersChanged, this); } -void MarkerList::Listener::markerListBeingDeleted (MarkerList* markerList) +void MarkerList::Listener::markerListBeingDeleted (MarkerList*) { } @@ -77338,8 +77341,8 @@ void CallOutBox::paint (Graphics& g) if (background.isNull()) { background = Image (Image::ARGB, getWidth(), getHeight(), true); - Graphics g (background); - getLookAndFeel().drawCallOutBoxBackground (*this, g, outline); + Graphics g2 (background); + getLookAndFeel().drawCallOutBoxBackground (*this, g2, outline); } g.setColour (Colours::black); @@ -79739,12 +79742,12 @@ public: return Expression::EvaluationContext::getSymbolValue (objectName, member); } - void componentMovedOrResized (Component& component, bool wasMoved, bool wasResized) + void componentMovedOrResized (Component&, bool /*wasMoved*/, bool /*wasResized*/) { apply(); } - void componentParentHierarchyChanged (Component& component) + void componentParentHierarchyChanged (Component&) { apply(); } @@ -79755,7 +79758,7 @@ public: sourceComponents.removeValue (&component); } - void markersChanged (MarkerList* markerList) + void markersChanged (MarkerList*) { apply(); } @@ -79801,7 +79804,7 @@ private: e.getSymbolParts (objectName, memberName); if (memberName.isNotEmpty()) - ok = registerComponentEdge (objectName, memberName) && ok; + ok = registerComponent (objectName) && ok; else ok = registerMarker (objectName) && ok; } @@ -79814,15 +79817,15 @@ private: return ok; } - bool registerComponentEdge (const String& objectName, const String memberName) + bool registerComponent (const String& componentID) { - Component* comp = findComponent (objectName); + Component* comp = findComponent (componentID); if (comp == 0) { - if (objectName == RelativeCoordinate::Strings::parent) + if (componentID == RelativeCoordinate::Strings::parent) comp = getComponent().getParentComponent(); - else if (objectName == RelativeCoordinate::Strings::this_ || objectName == getComponent().getComponentID()) + else if (componentID == RelativeCoordinate::Strings::this_ || componentID == getComponent().getComponentID()) comp = &getComponent(); } @@ -85588,20 +85591,20 @@ public: } } - void clipToImageAlpha (const Image& image, const AffineTransform& t) + void clipToImageAlpha (const Image& sourceImage, const AffineTransform& t) { if (clip != 0) { - if (image.hasAlphaChannel()) + if (sourceImage.hasAlphaChannel()) { cloneClipIfMultiplyReferenced(); - clip = clip->clipToImageAlpha (image, getTransformWith (t), + clip = clip->clipToImageAlpha (sourceImage, getTransformWith (t), interpolationQuality != Graphics::lowResamplingQuality); } else { Path p; - p.addRectangle (image.getBounds()); + p.addRectangle (sourceImage.getBounds()); clipToPath (p, t); } } @@ -85640,36 +85643,36 @@ public: SavedState* beginTransparencyLayer (float opacity) { - const Rectangle clip (getUntransformedClipBounds()); + const Rectangle layerBounds (getUntransformedClipBounds()); SavedState* s = new SavedState (*this); - s->image = Image (Image::ARGB, clip.getWidth(), clip.getHeight(), true); + s->image = Image (Image::ARGB, layerBounds.getWidth(), layerBounds.getHeight(), true); s->compositionAlpha = opacity; if (s->isOnlyTranslated) { - s->xOffset -= clip.getX(); - s->yOffset -= clip.getY(); + s->xOffset -= layerBounds.getX(); + s->yOffset -= layerBounds.getY(); } else { - s->complexTransform = s->complexTransform.followedBy (AffineTransform::translation ((float) -clip.getX(), - (float) -clip.getY())); + s->complexTransform = s->complexTransform.followedBy (AffineTransform::translation ((float) -layerBounds.getX(), + (float) -layerBounds.getY())); } s->cloneClipIfMultiplyReferenced(); - s->clip = s->clip->translated (-clip.getPosition()); + s->clip = s->clip->translated (-layerBounds.getPosition()); return s; } void endTransparencyLayer (SavedState& layerState) { - const Rectangle clip (getUntransformedClipBounds()); + const Rectangle layerBounds (getUntransformedClipBounds()); const ScopedPointer g (image.createLowLevelContext()); g->setOpacity (layerState.compositionAlpha); - g->drawImage (layerState.image, AffineTransform::translation ((float) clip.getX(), - (float) clip.getY()), false); + g->drawImage (layerState.image, AffineTransform::translation ((float) layerBounds.getX(), + (float) layerBounds.getY()), false); } void fillRect (const Rectangle& r, const bool replaceContents) @@ -87698,10 +87701,10 @@ namespace DrawablePathHelpers float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Point& targetPoint, Expression::EvaluationContext* nameFinder) const { using namespace DrawablePathHelpers; - const Identifier i (state.getType()); + const Identifier type (state.getType()); float bestProp = 0; - if (i == cubicToElement) + if (type == cubicToElement) { RelativePoint rp1 (getStartPoint()), rp2 (getControlPoint (0)), rp3 (getControlPoint (1)), rp4 (getEndPoint()); @@ -87722,7 +87725,7 @@ float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Po } } } - else if (i == quadraticToElement) + else if (type == quadraticToElement) { RelativePoint rp1 (getStartPoint()), rp2 (getControlPoint (0)), rp3 (getEndPoint()); const Point points[] = { rp1.resolve (nameFinder), rp2.resolve (nameFinder), rp3.resolve (nameFinder) }; @@ -87742,7 +87745,7 @@ float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Po } } } - else if (i == lineToElement) + else if (type == lineToElement) { RelativePoint rp1 (getStartPoint()), rp2 (getEndPoint()); const Line line (rp1.resolve (nameFinder), rp2.resolve (nameFinder)); @@ -87755,9 +87758,9 @@ float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Po ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point& targetPoint, Expression::EvaluationContext* nameFinder, UndoManager* undoManager) { ValueTree newTree; - const Identifier i (state.getType()); + const Identifier type (state.getType()); - if (i == cubicToElement) + if (type == cubicToElement) { float bestProp = findProportionAlongLine (targetPoint, nameFinder); @@ -87785,7 +87788,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point line (rp1.resolve (nameFinder), rp2.resolve (nameFinder)); @@ -87820,7 +87823,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point= 0) - faces.add (CachedFace()); + setSize (10); } ~TypefaceCache() @@ -89710,6 +89712,12 @@ public: juce_DeclareSingleton_SingleThreaded_Minimal (TypefaceCache) + void setSize (const int numToCache) + { + faces.clear(): + faces.insertMultiple (-1, CachedFace(), numToCache); + } + const Typeface::Ptr findTypefaceFor (const Font& font) { // (can't initialise defaultFace in the constructor or in getDefaultTypeface() because of recursion). @@ -89788,6 +89796,22 @@ private: juce_ImplementSingleton_SingleThreaded (TypefaceCache) +void Typeface::setTypefaceCacheSize (int numFontsToCache) +{ + TypefaceCache::getInstance()->setSize (numFontsToCache); +} + +Font::SharedFontInternal::SharedFontInternal (const float height_, const int styleFlags_) throw() + : typefaceName (Font::getDefaultSansSerifFontName()), + height (height_), + horizontalScale (1.0f), + kerning (0), + ascent (0), + styleFlags (styleFlags_), + typeface (TypefaceCache::getInstance()->getDefaultTypeface()) +{ +} + Font::SharedFontInternal::SharedFontInternal (const String& typefaceName_, const float height_, const int styleFlags_) throw() : typefaceName (typefaceName_), height (height_), @@ -89795,7 +89819,7 @@ Font::SharedFontInternal::SharedFontInternal (const String& typefaceName_, const kerning (0), ascent (0), styleFlags (styleFlags_), - typeface (TypefaceCache::getInstance()->getDefaultTypeface()) + typeface (0) { } @@ -89831,12 +89855,12 @@ bool Font::SharedFontInternal::operator== (const SharedFontInternal& other) cons } Font::Font() - : font (new SharedFontInternal (getDefaultSansSerifFontName(), FontValues::defaultFontHeight, Font::plain)) + : font (new SharedFontInternal (FontValues::defaultFontHeight, Font::plain)) { } Font::Font (const float fontHeight, const int styleFlags_) - : font (new SharedFontInternal (getDefaultSansSerifFontName(), FontValues::limitFontHeight (fontHeight), styleFlags_)) + : font (new SharedFontInternal (FontValues::limitFontHeight (fontHeight), styleFlags_)) { } @@ -254717,6 +254741,7 @@ void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask) or the SUPPORT_AFFINITIES macro was turned off */ jassertfalse; + (void) affinityMask; #endif } /*** End of inlined file: juce_posix_SharedCode.h ***/ @@ -264576,6 +264601,7 @@ void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask) or the SUPPORT_AFFINITIES macro was turned off */ jassertfalse; + (void) affinityMask; #endif } /*** End of inlined file: juce_posix_SharedCode.h ***/ @@ -268019,9 +268045,9 @@ void FileChooser::showPlatformDialog (Array& results, bool selectsDirectory, bool selectsFiles, bool isSaveDialogue, - bool warnAboutOverwritingExistingFiles, + bool /*warnAboutOverwritingExistingFiles*/, bool selectMultipleFiles, - FilePreviewComponent* extraInfoComponent) + FilePreviewComponent* /*extraInfoComponent*/) { const ScopedAutoReleasePool pool; @@ -268182,6 +268208,7 @@ END_JUCE_NAMESPACE - (void) _surfaceNeedsUpdate: (NSNotification*) notification { + (void) notification; const ScopedLock sl (*contextLock); needsUpdate = true; } @@ -268298,7 +268325,7 @@ public: const OpenGLPixelFormat getPixelFormat() const { return pixelFormat; } void* getRawContext() const throw() { return renderContext; } - void updateWindowPosition (int x, int y, int w, int h, int outerWindowHeight) + void updateWindowPosition (int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*outerWindowHeight*/) { } @@ -268368,7 +268395,7 @@ void juce_glViewport (const int w, const int h) } void OpenGLPixelFormat::getAvailablePixelFormats (Component* /*component*/, - OwnedArray & results) + OwnedArray & /*results*/) { /* GLint attribs [64]; int n = 0; @@ -273810,6 +273837,7 @@ END_JUCE_NAMESPACE - (void) _surfaceNeedsUpdate: (NSNotification*) notification { + (void) notification; const ScopedLock sl (*contextLock); needsUpdate = true; } @@ -273926,7 +273954,7 @@ public: const OpenGLPixelFormat getPixelFormat() const { return pixelFormat; } void* getRawContext() const throw() { return renderContext; } - void updateWindowPosition (int x, int y, int w, int h, int outerWindowHeight) + void updateWindowPosition (int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*outerWindowHeight*/) { } @@ -273996,7 +274024,7 @@ void juce_glViewport (const int w, const int h) } void OpenGLPixelFormat::getAvailablePixelFormats (Component* /*component*/, - OwnedArray & results) + OwnedArray & /*results*/) { /* GLint attribs [64]; int n = 0; @@ -274846,9 +274874,9 @@ void FileChooser::showPlatformDialog (Array& results, bool selectsDirectory, bool selectsFiles, bool isSaveDialogue, - bool warnAboutOverwritingExistingFiles, + bool /*warnAboutOverwritingExistingFiles*/, bool selectMultipleFiles, - FilePreviewComponent* extraInfoComponent) + FilePreviewComponent* /*extraInfoComponent*/) { const ScopedAutoReleasePool pool; @@ -275480,21 +275508,26 @@ END_JUCE_NAMESPACE - (void) cleanupTrackAfterBurn: (DRTrack*) track { + (void) track; } - (BOOL) cleanupTrackAfterVerification: (DRTrack*) track { + (void) track; return true; } - (uint64_t) estimateLengthOfTrack: (DRTrack*) track { + (void) track; return lengthInFrames; } - (BOOL) prepareTrack: (DRTrack*) track forBurn: (DRBurn*) burn toMedia: (NSDictionary*) mediaInfo { + (void) track; (void) burn; (void) mediaInfo; + if (source != 0) source->prepareToPlay (44100 / 75, 44100); @@ -275504,6 +275537,7 @@ END_JUCE_NAMESPACE - (BOOL) prepareTrackForVerification: (DRTrack*) track { + (void) track; if (source != 0) source->prepareToPlay (44100 / 75, 44100); @@ -275514,6 +275548,8 @@ END_JUCE_NAMESPACE length: (uint32_t) bufferLength atAddress: (uint64_t) address blockSize: (uint32_t) blockSize ioFlags: (uint32_t*) flags { + (void) track; (void) address; (void) blockSize; (void) flags; + if (source != 0) { const int numSamples = JUCE_NAMESPACE::jmin ((int) bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition); @@ -275557,6 +275593,7 @@ END_JUCE_NAMESPACE atAddress: (uint64_t) address blockSize: (uint32_t) blockSize ioFlags: (uint32_t*) flags { + (void) track; (void) address; (void) blockSize; (void) flags; zeromem (buffer, bufferLength); return bufferLength; } @@ -275565,6 +275602,7 @@ END_JUCE_NAMESPACE length: (uint32_t) bufferLength atAddress: (uint64_t) address blockSize: (uint32_t) blockSize ioFlags: (uint32_t*) flags { + (void) track; (void) buffer; (void) bufferLength; (void) address; (void) blockSize; (void) flags; return true; } @@ -276036,7 +276074,7 @@ bool AudioCDReader::isTrackAudio (int trackNum) const return tracks [trackNum].hasFileExtension (".aiff"); } -void AudioCDReader::enableIndexScanning (bool b) +void AudioCDReader::enableIndexScanning (bool) { // any way to do this on a Mac?? } @@ -276046,7 +276084,7 @@ int AudioCDReader::getLastIndex() const return 0; } -const Array AudioCDReader::findIndexesInTrack (const int trackNumber) +const Array AudioCDReader::findIndexesInTrack (const int /*trackNumber*/) { return Array (); } @@ -276477,7 +276515,7 @@ bool juce_postMessageToSystemQueue (Message* message) return true; } -void MessageManager::broadcastMessage (const String& value) +void MessageManager::broadcastMessage (const String&) { } diff --git a/juce_amalgamated.h b/juce_amalgamated.h index 9e7df3b605..67e41e7d43 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -671,13 +671,13 @@ namespace JuceDummyNamespace {} */ #define JUCE_DECLARE_NON_COPYABLE(className) \ className (const className&);\ - className& operator= (const className&); + className& operator= (const className&) /** This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for a class. */ #define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className) \ - JUCE_DECLARE_NON_COPYABLE(className)\ + JUCE_DECLARE_NON_COPYABLE(className);\ JUCE_LEAK_DETECTOR(className) #if ! DOXYGEN @@ -1274,7 +1274,7 @@ inline void swapVariables (Type& variable1, Type& variable2) inline int numElementsInArray (Type (&array)[N]) { (void) array; // (required to avoid a spurious warning in MS compilers) - sizeof (0[array]); // This line should cause an error if you pass an object with a user-defined subscript operator + (void) sizeof (0[array]); // This line should cause an error if you pass an object with a user-defined subscript operator return N; } #endif @@ -6426,9 +6426,9 @@ public: /** Removes a specific item from the list. Note that this will not delete the item, it simply unlinks it from the list. */ - void remove (ObjectType* const item) + void remove (ObjectType* const itemToRemove) { - LinkedListPointer* l = findPointerTo (item); + LinkedListPointer* const l = findPointerTo (itemToRemove); if (l != 0) l->removeNext(); @@ -23457,6 +23457,9 @@ public: /** Returns true if the typeface uses hinting. */ virtual bool isHinted() const { return false; } + /** Changes the number of fonts that are cached in memory. */ + static void setTypefaceCacheSize (int numFontsToCache); + protected: String name; @@ -23899,6 +23902,7 @@ private: class SharedFontInternal : public ReferenceCountedObject { public: + SharedFontInternal (float height, int styleFlags) throw(); SharedFontInternal (const String& typefaceName, float height, int styleFlags) throw(); SharedFontInternal (const Typeface::Ptr& typeface) throw(); SharedFontInternal (const SharedFontInternal& other) throw(); diff --git a/src/audio/audio_file_formats/juce_AudioFormatWriter.cpp b/src/audio/audio_file_formats/juce_AudioFormatWriter.cpp index 3b6ef47a48..78302f918f 100644 --- a/src/audio/audio_file_formats/juce_AudioFormatWriter.cpp +++ b/src/audio/audio_file_formats/juce_AudioFormatWriter.cpp @@ -184,9 +184,9 @@ class AudioFormatWriter::ThreadedWriter::Buffer : public TimeSliceClient, public AbstractFifo { public: - Buffer (TimeSliceThread& timeSliceThread_, AudioFormatWriter* writer_, int numChannels, int bufferSize) - : AbstractFifo (bufferSize), - buffer (numChannels, bufferSize), + Buffer (TimeSliceThread& timeSliceThread_, AudioFormatWriter* writer_, int numChannels, int bufferSize_) + : AbstractFifo (bufferSize_), + buffer (numChannels, bufferSize_), timeSliceThread (timeSliceThread_), writer (writer_), thumbnailToUpdate (0), diff --git a/src/audio/audio_file_formats/juce_AudioThumbnail.cpp b/src/audio/audio_file_formats/juce_AudioThumbnail.cpp index c4d9c606c3..d72be65769 100644 --- a/src/audio/audio_file_formats/juce_AudioThumbnail.cpp +++ b/src/audio/audio_file_formats/juce_AudioThumbnail.cpp @@ -685,7 +685,7 @@ void AudioThumbnail::addBlock (const int64 startSample, const AudioSampleBuffer& for (int chan = 0; chan < numChans; ++chan) { - const float* const source = incoming.getSampleData (chan, startOffsetInBuffer); + const float* const sourceData = incoming.getSampleData (chan, startOffsetInBuffer); MinMaxValue* const dest = thumbData + numToDo * chan; thumbChannels [chan] = dest; @@ -693,7 +693,7 @@ void AudioThumbnail::addBlock (const int64 startSample, const AudioSampleBuffer& { float low, high; const int start = i * samplesPerThumbSample; - findMinAndMax (source + start, jmin (samplesPerThumbSample, numSamples - start), low, high); + findMinAndMax (sourceData + start, jmin (samplesPerThumbSample, numSamples - start), low, high); dest[i].setFloat (low, high); } } diff --git a/src/audio/devices/juce_AudioDeviceManager.cpp b/src/audio/devices/juce_AudioDeviceManager.cpp index 6026cf9e13..03e0c79f62 100644 --- a/src/audio/devices/juce_AudioDeviceManager.cpp +++ b/src/audio/devices/juce_AudioDeviceManager.cpp @@ -610,21 +610,21 @@ void AudioDeviceManager::addAudioCallback (AudioIODeviceCallback* newCallback) callbacks.add (newCallback); } -void AudioDeviceManager::removeAudioCallback (AudioIODeviceCallback* callback) +void AudioDeviceManager::removeAudioCallback (AudioIODeviceCallback* callbackToRemove) { - if (callback != 0) + if (callbackToRemove != 0) { bool needsDeinitialising = currentAudioDevice != 0; { const ScopedLock sl (audioCallbackLock); - needsDeinitialising = needsDeinitialising && callbacks.contains (callback); - callbacks.removeValue (callback); + needsDeinitialising = needsDeinitialising && callbacks.contains (callbackToRemove); + callbacks.removeValue (callbackToRemove); } if (needsDeinitialising) - callback->audioDeviceStopped(); + callbackToRemove->audioDeviceStopped(); } } @@ -791,13 +791,13 @@ bool AudioDeviceManager::isMidiInputEnabled (const String& name) const } void AudioDeviceManager::addMidiInputCallback (const String& name, - MidiInputCallback* callback) + MidiInputCallback* callbackToAdd) { - removeMidiInputCallback (name, callback); + removeMidiInputCallback (name, callbackToAdd); if (name.isEmpty()) { - midiCallbacks.add (callback); + midiCallbacks.add (callbackToAdd); midiCallbackDevices.add (0); } else @@ -807,7 +807,7 @@ void AudioDeviceManager::addMidiInputCallback (const String& name, if (enabledMidiInputs[i]->getName() == name) { const ScopedLock sl (midiCallbackLock); - midiCallbacks.add (callback); + midiCallbacks.add (callbackToAdd); midiCallbackDevices.add (enabledMidiInputs[i]); break; } @@ -815,8 +815,7 @@ void AudioDeviceManager::addMidiInputCallback (const String& name, } } -void AudioDeviceManager::removeMidiInputCallback (const String& name, - MidiInputCallback* /*callback*/) +void AudioDeviceManager::removeMidiInputCallback (const String& name, MidiInputCallback* /*callback*/) { const ScopedLock sl (midiCallbackLock); diff --git a/src/audio/processors/juce_AudioProcessorPlayer.cpp b/src/audio/processors/juce_AudioProcessorPlayer.cpp index f78b8386d2..5d58750df4 100644 --- a/src/audio/processors/juce_AudioProcessorPlayer.cpp +++ b/src/audio/processors/juce_AudioProcessorPlayer.cpp @@ -134,7 +134,7 @@ void AudioProcessorPlayer::audioDeviceIOCallback (const float** const inputChann if (processor != 0) { - const ScopedLock sl (processor->getCallbackLock()); + const ScopedLock sl2 (processor->getCallbackLock()); if (processor->isSuspended()) { diff --git a/src/containers/juce_LinkedListPointer.h b/src/containers/juce_LinkedListPointer.h index 09b683f524..49518c967e 100644 --- a/src/containers/juce_LinkedListPointer.h +++ b/src/containers/juce_LinkedListPointer.h @@ -251,9 +251,9 @@ public: /** Removes a specific item from the list. Note that this will not delete the item, it simply unlinks it from the list. */ - void remove (ObjectType* const item) + void remove (ObjectType* const itemToRemove) { - LinkedListPointer* l = findPointerTo (item); + LinkedListPointer* const l = findPointerTo (itemToRemove); if (l != 0) l->removeNext(); diff --git a/src/core/juce_PlatformDefs.h b/src/core/juce_PlatformDefs.h index f65da86719..d3f4aa7c82 100644 --- a/src/core/juce_PlatformDefs.h +++ b/src/core/juce_PlatformDefs.h @@ -184,13 +184,13 @@ */ #define JUCE_DECLARE_NON_COPYABLE(className) \ className (const className&);\ - className& operator= (const className&); + className& operator= (const className&) /** This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for a class. */ #define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className) \ - JUCE_DECLARE_NON_COPYABLE(className)\ + JUCE_DECLARE_NON_COPYABLE(className);\ JUCE_LEAK_DETECTOR(className) diff --git a/src/gui/components/code_editor/juce_CodeDocument.cpp b/src/gui/components/code_editor/juce_CodeDocument.cpp index 7353abba17..b6ff749a5d 100644 --- a/src/gui/components/code_editor/juce_CodeDocument.cpp +++ b/src/gui/components/code_editor/juce_CodeDocument.cpp @@ -283,7 +283,7 @@ bool CodeDocument::Position::operator!= (const Position& other) const throw() return ! operator== (other); } -void CodeDocument::Position::setLineAndIndex (const int newLine, const int newIndexInLine) +void CodeDocument::Position::setLineAndIndex (const int newLineNum, const int newIndexInLine) { jassert (owner != 0); @@ -295,7 +295,7 @@ void CodeDocument::Position::setLineAndIndex (const int newLine, const int newIn } else { - if (newLine >= owner->lines.size()) + if (newLineNum >= owner->lines.size()) { line = owner->lines.size() - 1; @@ -307,7 +307,7 @@ void CodeDocument::Position::setLineAndIndex (const int newLine, const int newIn } else { - line = jmax (0, newLine); + line = jmax (0, newLineNum); CodeDocumentLine* const l = owner->lines.getUnchecked (line); jassert (l != 0); @@ -566,10 +566,10 @@ bool CodeDocument::writeToStream (OutputStream& stream) return true; } -void CodeDocument::setNewLineCharacters (const String& newLine) throw() +void CodeDocument::setNewLineCharacters (const String& newLineChars_) throw() { - jassert (newLine == "\r\n" || newLine == "\n" || newLine == "\r"); - newLineChars = newLine; + jassert (newLineChars_ == "\r\n" || newLineChars_ == "\n" || newLineChars_ == "\r"); + newLineChars = newLineChars_; } void CodeDocument::newTransaction() diff --git a/src/gui/components/juce_Component.cpp b/src/gui/components/juce_Component.cpp index 81ce32d20d..72492c4cb9 100644 --- a/src/gui/components/juce_Component.cpp +++ b/src/gui/components/juce_Component.cpp @@ -138,18 +138,20 @@ public: static void sendWheelEvent (Component& comp, BailOutChecker& checker, const MouseEvent& e, const float wheelIncrementX, const float wheelIncrementY) { - MouseListenerList* const list = comp.mouseListeners; - - if (list != 0) { - for (int i = list->listeners.size(); --i >= 0;) + MouseListenerList* const list = comp.mouseListeners; + + if (list != 0) { - list->listeners.getUnchecked(i)->mouseWheelMove (e, wheelIncrementX, wheelIncrementY); + for (int i = list->listeners.size(); --i >= 0;) + { + list->listeners.getUnchecked(i)->mouseWheelMove (e, wheelIncrementX, wheelIncrementY); - if (checker.shouldBailOut()) - return; + if (checker.shouldBailOut()) + return; - i = jmin (i, list->listeners.size()); + i = jmin (i, list->listeners.size()); + } } } @@ -1543,7 +1545,7 @@ int Component::runModalLoop() return ModalComponentManager::getInstance()->runEventLoopForCurrentComponent(); } -void Component::enterModalState (const bool takeKeyboardFocus, ModalComponentManager::Callback* const callback) +void Component::enterModalState (const bool shouldTakeKeyboardFocus, ModalComponentManager::Callback* const callback) { // if component methods are being called from threads other than the message // thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe. @@ -1559,7 +1561,7 @@ void Component::enterModalState (const bool takeKeyboardFocus, ModalComponentMan flags.currentlyModalFlag = true; setVisible (true); - if (takeKeyboardFocus) + if (shouldTakeKeyboardFocus) grabKeyboardFocus(); } } diff --git a/src/gui/components/layout/juce_MarkerList.cpp b/src/gui/components/layout/juce_MarkerList.cpp index be86a438df..d16221ee79 100644 --- a/src/gui/components/layout/juce_MarkerList.cpp +++ b/src/gui/components/layout/juce_MarkerList.cpp @@ -152,7 +152,7 @@ void MarkerList::markersHaveChanged() listeners.call (&MarkerList::Listener::markersChanged, this); } -void MarkerList::Listener::markerListBeingDeleted (MarkerList* markerList) +void MarkerList::Listener::markerListBeingDeleted (MarkerList*) { } diff --git a/src/gui/components/windows/juce_CallOutBox.cpp b/src/gui/components/windows/juce_CallOutBox.cpp index e0cfdff3f8..bb22c10b16 100644 --- a/src/gui/components/windows/juce_CallOutBox.cpp +++ b/src/gui/components/windows/juce_CallOutBox.cpp @@ -79,8 +79,8 @@ void CallOutBox::paint (Graphics& g) if (background.isNull()) { background = Image (Image::ARGB, getWidth(), getHeight(), true); - Graphics g (background); - getLookAndFeel().drawCallOutBoxBackground (*this, g, outline); + Graphics g2 (background); + getLookAndFeel().drawCallOutBoxBackground (*this, g2, outline); } g.setColour (Colours::black); diff --git a/src/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp b/src/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp index 7de8986454..4581377e59 100644 --- a/src/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp +++ b/src/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp @@ -1921,20 +1921,20 @@ public: } } - void clipToImageAlpha (const Image& image, const AffineTransform& t) + void clipToImageAlpha (const Image& sourceImage, const AffineTransform& t) { if (clip != 0) { - if (image.hasAlphaChannel()) + if (sourceImage.hasAlphaChannel()) { cloneClipIfMultiplyReferenced(); - clip = clip->clipToImageAlpha (image, getTransformWith (t), + clip = clip->clipToImageAlpha (sourceImage, getTransformWith (t), interpolationQuality != Graphics::lowResamplingQuality); } else { Path p; - p.addRectangle (image.getBounds()); + p.addRectangle (sourceImage.getBounds()); clipToPath (p, t); } } @@ -1973,36 +1973,36 @@ public: SavedState* beginTransparencyLayer (float opacity) { - const Rectangle clip (getUntransformedClipBounds()); + const Rectangle layerBounds (getUntransformedClipBounds()); SavedState* s = new SavedState (*this); - s->image = Image (Image::ARGB, clip.getWidth(), clip.getHeight(), true); + s->image = Image (Image::ARGB, layerBounds.getWidth(), layerBounds.getHeight(), true); s->compositionAlpha = opacity; if (s->isOnlyTranslated) { - s->xOffset -= clip.getX(); - s->yOffset -= clip.getY(); + s->xOffset -= layerBounds.getX(); + s->yOffset -= layerBounds.getY(); } else { - s->complexTransform = s->complexTransform.followedBy (AffineTransform::translation ((float) -clip.getX(), - (float) -clip.getY())); + s->complexTransform = s->complexTransform.followedBy (AffineTransform::translation ((float) -layerBounds.getX(), + (float) -layerBounds.getY())); } s->cloneClipIfMultiplyReferenced(); - s->clip = s->clip->translated (-clip.getPosition()); + s->clip = s->clip->translated (-layerBounds.getPosition()); return s; } void endTransparencyLayer (SavedState& layerState) { - const Rectangle clip (getUntransformedClipBounds()); + const Rectangle layerBounds (getUntransformedClipBounds()); const ScopedPointer g (image.createLowLevelContext()); g->setOpacity (layerState.compositionAlpha); - g->drawImage (layerState.image, AffineTransform::translation ((float) clip.getX(), - (float) clip.getY()), false); + g->drawImage (layerState.image, AffineTransform::translation ((float) layerBounds.getX(), + (float) layerBounds.getY()), false); } //============================================================================== diff --git a/src/gui/graphics/drawables/juce_DrawablePath.cpp b/src/gui/graphics/drawables/juce_DrawablePath.cpp index f6c2a005db..1a0d880ddd 100644 --- a/src/gui/graphics/drawables/juce_DrawablePath.cpp +++ b/src/gui/graphics/drawables/juce_DrawablePath.cpp @@ -305,10 +305,10 @@ namespace DrawablePathHelpers float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Point& targetPoint, Expression::EvaluationContext* nameFinder) const { using namespace DrawablePathHelpers; - const Identifier i (state.getType()); + const Identifier type (state.getType()); float bestProp = 0; - if (i == cubicToElement) + if (type == cubicToElement) { RelativePoint rp1 (getStartPoint()), rp2 (getControlPoint (0)), rp3 (getControlPoint (1)), rp4 (getEndPoint()); @@ -329,7 +329,7 @@ float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Po } } } - else if (i == quadraticToElement) + else if (type == quadraticToElement) { RelativePoint rp1 (getStartPoint()), rp2 (getControlPoint (0)), rp3 (getEndPoint()); const Point points[] = { rp1.resolve (nameFinder), rp2.resolve (nameFinder), rp3.resolve (nameFinder) }; @@ -349,7 +349,7 @@ float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Po } } } - else if (i == lineToElement) + else if (type == lineToElement) { RelativePoint rp1 (getStartPoint()), rp2 (getEndPoint()); const Line line (rp1.resolve (nameFinder), rp2.resolve (nameFinder)); @@ -362,9 +362,9 @@ float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Po ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point& targetPoint, Expression::EvaluationContext* nameFinder, UndoManager* undoManager) { ValueTree newTree; - const Identifier i (state.getType()); + const Identifier type (state.getType()); - if (i == cubicToElement) + if (type == cubicToElement) { float bestProp = findProportionAlongLine (targetPoint, nameFinder); @@ -392,7 +392,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point line (rp1.resolve (nameFinder), rp2.resolve (nameFinder)); @@ -427,7 +427,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point= 0) - faces.add (CachedFace()); + setSize (10); } ~TypefaceCache() @@ -65,6 +64,12 @@ public: juce_DeclareSingleton_SingleThreaded_Minimal (TypefaceCache) + void setSize (const int numToCache) + { + faces.clear(): + faces.insertMultiple (-1, CachedFace(), numToCache); + } + const Typeface::Ptr findTypefaceFor (const Font& font) { // (can't initialise defaultFace in the constructor or in getDefaultTypeface() because of recursion). @@ -143,8 +148,23 @@ private: juce_ImplementSingleton_SingleThreaded (TypefaceCache) +void Typeface::setTypefaceCacheSize (int numFontsToCache) +{ + TypefaceCache::getInstance()->setSize (numFontsToCache); +} //============================================================================== +Font::SharedFontInternal::SharedFontInternal (const float height_, const int styleFlags_) throw() + : typefaceName (Font::getDefaultSansSerifFontName()), + height (height_), + horizontalScale (1.0f), + kerning (0), + ascent (0), + styleFlags (styleFlags_), + typeface (TypefaceCache::getInstance()->getDefaultTypeface()) +{ +} + Font::SharedFontInternal::SharedFontInternal (const String& typefaceName_, const float height_, const int styleFlags_) throw() : typefaceName (typefaceName_), height (height_), @@ -152,7 +172,7 @@ Font::SharedFontInternal::SharedFontInternal (const String& typefaceName_, const kerning (0), ascent (0), styleFlags (styleFlags_), - typeface (TypefaceCache::getInstance()->getDefaultTypeface()) + typeface (0) { } @@ -189,12 +209,12 @@ bool Font::SharedFontInternal::operator== (const SharedFontInternal& other) cons //============================================================================== Font::Font() - : font (new SharedFontInternal (getDefaultSansSerifFontName(), FontValues::defaultFontHeight, Font::plain)) + : font (new SharedFontInternal (FontValues::defaultFontHeight, Font::plain)) { } Font::Font (const float fontHeight, const int styleFlags_) - : font (new SharedFontInternal (getDefaultSansSerifFontName(), FontValues::limitFontHeight (fontHeight), styleFlags_)) + : font (new SharedFontInternal (FontValues::limitFontHeight (fontHeight), styleFlags_)) { } diff --git a/src/gui/graphics/fonts/juce_Font.h b/src/gui/graphics/fonts/juce_Font.h index 05b57b0164..724443eff0 100644 --- a/src/gui/graphics/fonts/juce_Font.h +++ b/src/gui/graphics/fonts/juce_Font.h @@ -367,6 +367,7 @@ private: class SharedFontInternal : public ReferenceCountedObject { public: + SharedFontInternal (float height, int styleFlags) throw(); SharedFontInternal (const String& typefaceName, float height, int styleFlags) throw(); SharedFontInternal (const Typeface::Ptr& typeface) throw(); SharedFontInternal (const SharedFontInternal& other) throw(); diff --git a/src/gui/graphics/fonts/juce_Typeface.h b/src/gui/graphics/fonts/juce_Typeface.h index c5dfe97407..85433d8fc3 100644 --- a/src/gui/graphics/fonts/juce_Typeface.h +++ b/src/gui/graphics/fonts/juce_Typeface.h @@ -114,6 +114,10 @@ public: /** Returns true if the typeface uses hinting. */ virtual bool isHinted() const { return false; } + //============================================================================== + /** Changes the number of fonts that are cached in memory. */ + static void setTypefaceCacheSize (int numFontsToCache); + protected: //============================================================================== String name; diff --git a/src/gui/graphics/geometry/juce_RelativeCoordinate.cpp b/src/gui/graphics/geometry/juce_RelativeCoordinate.cpp index 2971119685..59f89c1d08 100644 --- a/src/gui/graphics/geometry/juce_RelativeCoordinate.cpp +++ b/src/gui/graphics/geometry/juce_RelativeCoordinate.cpp @@ -100,12 +100,12 @@ public: return Expression::EvaluationContext::getSymbolValue (objectName, member); } - void componentMovedOrResized (Component& component, bool wasMoved, bool wasResized) + void componentMovedOrResized (Component&, bool /*wasMoved*/, bool /*wasResized*/) { apply(); } - void componentParentHierarchyChanged (Component& component) + void componentParentHierarchyChanged (Component&) { apply(); } @@ -116,7 +116,7 @@ public: sourceComponents.removeValue (&component); } - void markersChanged (MarkerList* markerList) + void markersChanged (MarkerList*) { apply(); } @@ -162,7 +162,7 @@ private: e.getSymbolParts (objectName, memberName); if (memberName.isNotEmpty()) - ok = registerComponentEdge (objectName, memberName) && ok; + ok = registerComponent (objectName) && ok; else ok = registerMarker (objectName) && ok; } @@ -175,15 +175,15 @@ private: return ok; } - bool registerComponentEdge (const String& objectName, const String memberName) + bool registerComponent (const String& componentID) { - Component* comp = findComponent (objectName); + Component* comp = findComponent (componentID); if (comp == 0) { - if (objectName == RelativeCoordinate::Strings::parent) + if (componentID == RelativeCoordinate::Strings::parent) comp = getComponent().getParentComponent(); - else if (objectName == RelativeCoordinate::Strings::this_ || objectName == getComponent().getComponentID()) + else if (componentID == RelativeCoordinate::Strings::this_ || componentID == getComponent().getComponentID()) comp = &getComponent(); } diff --git a/src/io/network/juce_URL.cpp b/src/io/network/juce_URL.cpp index d5363769f2..765f9af42b 100644 --- a/src/io/network/juce_URL.cpp +++ b/src/io/network/juce_URL.cpp @@ -291,17 +291,17 @@ InputStream* URL::createInputStream (const bool usePostCommand, StringPairArray* const responseHeaders) const { String headers; - MemoryBlock postData; + MemoryBlock headersAndPostData; if (usePostCommand) - URLHelpers::createHeadersAndPostData (*this, headers, postData); + URLHelpers::createHeadersAndPostData (*this, headers, headersAndPostData); headers += extraHeaders; if (! headers.endsWithChar ('\n')) headers << "\r\n"; - return createNativeStream (toString (! usePostCommand), usePostCommand, postData, + return createNativeStream (toString (! usePostCommand), usePostCommand, headersAndPostData, progressCallback, progressCallbackContext, headers, timeOutMs, responseHeaders); } diff --git a/src/maths/juce_Expression.cpp b/src/maths/juce_Expression.cpp index d48e377be4..eaec4ef62f 100644 --- a/src/maths/juce_Expression.cpp +++ b/src/maths/juce_Expression.cpp @@ -427,9 +427,11 @@ public: static Constant* findTermToAdjust (Term* const term, const bool mustBeFlagged) { - Constant* c = dynamic_cast (term); - if (c != 0 && (c->isResolutionTarget || ! mustBeFlagged)) - return c; + { + Constant* c = dynamic_cast (term); + if (c != 0 && (c->isResolutionTarget || ! mustBeFlagged)) + return c; + } if (dynamic_cast (term) != 0) return 0; diff --git a/src/maths/juce_MathsFunctions.h b/src/maths/juce_MathsFunctions.h index 703c99e69d..ffc7c01ae1 100644 --- a/src/maths/juce_MathsFunctions.h +++ b/src/maths/juce_MathsFunctions.h @@ -284,7 +284,7 @@ inline void swapVariables (Type& variable1, Type& variable2) inline int numElementsInArray (Type (&array)[N]) { (void) array; // (required to avoid a spurious warning in MS compilers) - sizeof (0[array]); // This line should cause an error if you pass an object with a user-defined subscript operator + (void) sizeof (0[array]); // This line should cause an error if you pass an object with a user-defined subscript operator return N; } #endif diff --git a/src/native/common/juce_posix_SharedCode.h b/src/native/common/juce_posix_SharedCode.h index 34225ba27d..81b2df7eb9 100644 --- a/src/native/common/juce_posix_SharedCode.h +++ b/src/native/common/juce_posix_SharedCode.h @@ -772,5 +772,6 @@ void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask) or the SUPPORT_AFFINITIES macro was turned off */ jassertfalse; + (void) affinityMask; #endif } diff --git a/src/native/mac/juce_mac_AudioCDBurner.mm b/src/native/mac/juce_mac_AudioCDBurner.mm index 9587e1c99c..d9d59448dc 100644 --- a/src/native/mac/juce_mac_AudioCDBurner.mm +++ b/src/native/mac/juce_mac_AudioCDBurner.mm @@ -230,21 +230,26 @@ END_JUCE_NAMESPACE - (void) cleanupTrackAfterBurn: (DRTrack*) track { + (void) track; } - (BOOL) cleanupTrackAfterVerification: (DRTrack*) track { + (void) track; return true; } - (uint64_t) estimateLengthOfTrack: (DRTrack*) track { + (void) track; return lengthInFrames; } - (BOOL) prepareTrack: (DRTrack*) track forBurn: (DRBurn*) burn toMedia: (NSDictionary*) mediaInfo { + (void) track; (void) burn; (void) mediaInfo; + if (source != 0) source->prepareToPlay (44100 / 75, 44100); @@ -254,6 +259,7 @@ END_JUCE_NAMESPACE - (BOOL) prepareTrackForVerification: (DRTrack*) track { + (void) track; if (source != 0) source->prepareToPlay (44100 / 75, 44100); @@ -264,6 +270,8 @@ END_JUCE_NAMESPACE length: (uint32_t) bufferLength atAddress: (uint64_t) address blockSize: (uint32_t) blockSize ioFlags: (uint32_t*) flags { + (void) track; (void) address; (void) blockSize; (void) flags; + if (source != 0) { const int numSamples = JUCE_NAMESPACE::jmin ((int) bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition); @@ -307,6 +315,7 @@ END_JUCE_NAMESPACE atAddress: (uint64_t) address blockSize: (uint32_t) blockSize ioFlags: (uint32_t*) flags { + (void) track; (void) address; (void) blockSize; (void) flags; zeromem (buffer, bufferLength); return bufferLength; } @@ -315,6 +324,7 @@ END_JUCE_NAMESPACE length: (uint32_t) bufferLength atAddress: (uint64_t) address blockSize: (uint32_t) blockSize ioFlags: (uint32_t*) flags { + (void) track; (void) buffer; (void) bufferLength; (void) address; (void) blockSize; (void) flags; return true; } diff --git a/src/native/mac/juce_mac_AudioCDReader.mm b/src/native/mac/juce_mac_AudioCDReader.mm index 6c1b6980db..62e6b3c876 100644 --- a/src/native/mac/juce_mac_AudioCDReader.mm +++ b/src/native/mac/juce_mac_AudioCDReader.mm @@ -245,7 +245,7 @@ bool AudioCDReader::isTrackAudio (int trackNum) const return tracks [trackNum].hasFileExtension (".aiff"); } -void AudioCDReader::enableIndexScanning (bool b) +void AudioCDReader::enableIndexScanning (bool) { // any way to do this on a Mac?? } @@ -255,7 +255,7 @@ int AudioCDReader::getLastIndex() const return 0; } -const Array AudioCDReader::findIndexesInTrack (const int trackNumber) +const Array AudioCDReader::findIndexesInTrack (const int /*trackNumber*/) { return Array (); } diff --git a/src/native/mac/juce_mac_FileChooser.mm b/src/native/mac/juce_mac_FileChooser.mm index 5afc6e74c9..8876dedf83 100644 --- a/src/native/mac/juce_mac_FileChooser.mm +++ b/src/native/mac/juce_mac_FileChooser.mm @@ -87,9 +87,9 @@ void FileChooser::showPlatformDialog (Array& results, bool selectsDirectory, bool selectsFiles, bool isSaveDialogue, - bool warnAboutOverwritingExistingFiles, + bool /*warnAboutOverwritingExistingFiles*/, bool selectMultipleFiles, - FilePreviewComponent* extraInfoComponent) + FilePreviewComponent* /*extraInfoComponent*/) { const ScopedAutoReleasePool pool; diff --git a/src/native/mac/juce_mac_MessageManager.mm b/src/native/mac/juce_mac_MessageManager.mm index 3ca36b8165..4510dc2226 100644 --- a/src/native/mac/juce_mac_MessageManager.mm +++ b/src/native/mac/juce_mac_MessageManager.mm @@ -450,7 +450,7 @@ bool juce_postMessageToSystemQueue (Message* message) return true; } -void MessageManager::broadcastMessage (const String& value) +void MessageManager::broadcastMessage (const String&) { } diff --git a/src/native/mac/juce_mac_OpenGLComponent.mm b/src/native/mac/juce_mac_OpenGLComponent.mm index b558e6c74a..33def5d0b4 100644 --- a/src/native/mac/juce_mac_OpenGLComponent.mm +++ b/src/native/mac/juce_mac_OpenGLComponent.mm @@ -95,6 +95,7 @@ END_JUCE_NAMESPACE - (void) _surfaceNeedsUpdate: (NSNotification*) notification { + (void) notification; const ScopedLock sl (*contextLock); needsUpdate = true; } @@ -212,7 +213,7 @@ public: const OpenGLPixelFormat getPixelFormat() const { return pixelFormat; } void* getRawContext() const throw() { return renderContext; } - void updateWindowPosition (int x, int y, int w, int h, int outerWindowHeight) + void updateWindowPosition (int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*outerWindowHeight*/) { } @@ -285,7 +286,7 @@ void juce_glViewport (const int w, const int h) } void OpenGLPixelFormat::getAvailablePixelFormats (Component* /*component*/, - OwnedArray & results) + OwnedArray & /*results*/) { /* GLint attribs [64]; int n = 0;