| @@ -5037,9 +5037,11 @@ public: | |||
| static Constant* findTermToAdjust (Term* const term, const bool mustBeFlagged) | |||
| { | |||
| Constant* c = dynamic_cast<Constant*> (term); | |||
| if (c != 0 && (c->isResolutionTarget || ! mustBeFlagged)) | |||
| return c; | |||
| { | |||
| Constant* c = dynamic_cast<Constant*> (term); | |||
| if (c != 0 && (c->isResolutionTarget || ! mustBeFlagged)) | |||
| return c; | |||
| } | |||
| if (dynamic_cast<Function*> (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<int> clip (getUntransformedClipBounds()); | |||
| const Rectangle<int> 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<int> clip (getUntransformedClipBounds()); | |||
| const Rectangle<int> layerBounds (getUntransformedClipBounds()); | |||
| const ScopedPointer<LowLevelGraphicsContext> 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<int>& r, const bool replaceContents) | |||
| @@ -87698,10 +87701,10 @@ namespace DrawablePathHelpers | |||
| float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Point<float>& 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<float> 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<float> 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<float>& 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<floa | |||
| state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager); | |||
| } | |||
| else if (i == quadraticToElement) | |||
| else if (type == quadraticToElement) | |||
| { | |||
| float bestProp = findProportionAlongLine (targetPoint, nameFinder); | |||
| @@ -87807,7 +87810,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point<floa | |||
| state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager); | |||
| } | |||
| else if (i == lineToElement) | |||
| else if (type == lineToElement) | |||
| { | |||
| RelativePoint rp1 (getStartPoint()), rp2 (getEndPoint()); | |||
| const Line<float> line (rp1.resolve (nameFinder), rp2.resolve (nameFinder)); | |||
| @@ -87820,7 +87823,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point<floa | |||
| state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager); | |||
| } | |||
| else if (i == closeSubPathElement) | |||
| else if (type == closeSubPathElement) | |||
| { | |||
| } | |||
| @@ -89696,11 +89699,10 @@ namespace FontValues | |||
| class TypefaceCache : public DeletedAtShutdown | |||
| { | |||
| public: | |||
| TypefaceCache (int numToCache = 10) | |||
| : counter (1) | |||
| TypefaceCache() | |||
| : counter (0) | |||
| { | |||
| while (--numToCache >= 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<File>& 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 <OpenGLPixelFormat>& results) | |||
| OwnedArray <OpenGLPixelFormat>& /*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 <OpenGLPixelFormat>& results) | |||
| OwnedArray <OpenGLPixelFormat>& /*results*/) | |||
| { | |||
| /* GLint attribs [64]; | |||
| int n = 0; | |||
| @@ -274846,9 +274874,9 @@ void FileChooser::showPlatformDialog (Array<File>& 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 <int> AudioCDReader::findIndexesInTrack (const int trackNumber) | |||
| const Array <int> AudioCDReader::findIndexesInTrack (const int /*trackNumber*/) | |||
| { | |||
| return Array <int>(); | |||
| } | |||
| @@ -276477,7 +276515,7 @@ bool juce_postMessageToSystemQueue (Message* message) | |||
| return true; | |||
| } | |||
| void MessageManager::broadcastMessage (const String& value) | |||
| void MessageManager::broadcastMessage (const String&) | |||
| { | |||
| } | |||
| @@ -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(); | |||
| @@ -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), | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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); | |||
| @@ -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()) | |||
| { | |||
| @@ -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(); | |||
| @@ -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) | |||
| @@ -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() | |||
| @@ -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(); | |||
| } | |||
| } | |||
| @@ -152,7 +152,7 @@ void MarkerList::markersHaveChanged() | |||
| listeners.call (&MarkerList::Listener::markersChanged, this); | |||
| } | |||
| void MarkerList::Listener::markerListBeingDeleted (MarkerList* markerList) | |||
| void MarkerList::Listener::markerListBeingDeleted (MarkerList*) | |||
| { | |||
| } | |||
| @@ -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); | |||
| @@ -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<int> clip (getUntransformedClipBounds()); | |||
| const Rectangle<int> 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<int> clip (getUntransformedClipBounds()); | |||
| const Rectangle<int> layerBounds (getUntransformedClipBounds()); | |||
| const ScopedPointer<LowLevelGraphicsContext> 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); | |||
| } | |||
| //============================================================================== | |||
| @@ -305,10 +305,10 @@ namespace DrawablePathHelpers | |||
| float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Point<float>& 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<float> 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<float> 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<float>& 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<floa | |||
| state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager); | |||
| } | |||
| else if (i == quadraticToElement) | |||
| else if (type == quadraticToElement) | |||
| { | |||
| float bestProp = findProportionAlongLine (targetPoint, nameFinder); | |||
| @@ -414,7 +414,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point<floa | |||
| state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager); | |||
| } | |||
| else if (i == lineToElement) | |||
| else if (type == lineToElement) | |||
| { | |||
| RelativePoint rp1 (getStartPoint()), rp2 (getEndPoint()); | |||
| const Line<float> line (rp1.resolve (nameFinder), rp2.resolve (nameFinder)); | |||
| @@ -427,7 +427,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point<floa | |||
| state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager); | |||
| } | |||
| else if (i == closeSubPathElement) | |||
| else if (type == closeSubPathElement) | |||
| { | |||
| } | |||
| @@ -51,11 +51,10 @@ namespace FontValues | |||
| class TypefaceCache : public DeletedAtShutdown | |||
| { | |||
| public: | |||
| TypefaceCache (int numToCache = 10) | |||
| : counter (1) | |||
| TypefaceCache() | |||
| : counter (0) | |||
| { | |||
| while (--numToCache >= 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_)) | |||
| { | |||
| } | |||
| @@ -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(); | |||
| @@ -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; | |||
| @@ -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(); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -427,9 +427,11 @@ public: | |||
| static Constant* findTermToAdjust (Term* const term, const bool mustBeFlagged) | |||
| { | |||
| Constant* c = dynamic_cast<Constant*> (term); | |||
| if (c != 0 && (c->isResolutionTarget || ! mustBeFlagged)) | |||
| return c; | |||
| { | |||
| Constant* c = dynamic_cast<Constant*> (term); | |||
| if (c != 0 && (c->isResolutionTarget || ! mustBeFlagged)) | |||
| return c; | |||
| } | |||
| if (dynamic_cast<Function*> (term) != 0) | |||
| return 0; | |||
| @@ -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 | |||
| @@ -772,5 +772,6 @@ void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask) | |||
| or the SUPPORT_AFFINITIES macro was turned off | |||
| */ | |||
| jassertfalse; | |||
| (void) affinityMask; | |||
| #endif | |||
| } | |||
| @@ -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; | |||
| } | |||
| @@ -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 <int> AudioCDReader::findIndexesInTrack (const int trackNumber) | |||
| const Array <int> AudioCDReader::findIndexesInTrack (const int /*trackNumber*/) | |||
| { | |||
| return Array <int>(); | |||
| } | |||
| @@ -87,9 +87,9 @@ void FileChooser::showPlatformDialog (Array<File>& results, | |||
| bool selectsDirectory, | |||
| bool selectsFiles, | |||
| bool isSaveDialogue, | |||
| bool warnAboutOverwritingExistingFiles, | |||
| bool /*warnAboutOverwritingExistingFiles*/, | |||
| bool selectMultipleFiles, | |||
| FilePreviewComponent* extraInfoComponent) | |||
| FilePreviewComponent* /*extraInfoComponent*/) | |||
| { | |||
| const ScopedAutoReleasePool pool; | |||
| @@ -450,7 +450,7 @@ bool juce_postMessageToSystemQueue (Message* message) | |||
| return true; | |||
| } | |||
| void MessageManager::broadcastMessage (const String& value) | |||
| void MessageManager::broadcastMessage (const String&) | |||
| { | |||
| } | |||
| @@ -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 <OpenGLPixelFormat>& results) | |||
| OwnedArray <OpenGLPixelFormat>& /*results*/) | |||
| { | |||
| /* GLint attribs [64]; | |||
| int n = 0; | |||