1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-08 04:20:09 +00:00

Cleaned up some compiler warnings. Jucer development.

This commit is contained in:
Julian Storer 2010-05-04 21:27:45 +01:00
parent e6a5f1501f
commit b9443c8ba3
88 changed files with 862 additions and 688 deletions

View file

@ -191,10 +191,10 @@ public:
#define juce_InterlockedDecrement64(a) _InterlockedDecrement64(a)
#else
// None of these atomics are available in a 32-bit Windows build!!
static __int64 juce_InterlockedExchangeAdd64 (volatile __int64* a, __int64 b) throw() { jassertfalse; __int64 old = *a; *a += b; return old; }
static __int64 juce_InterlockedExchange64 (volatile __int64* a, __int64 b) throw() { jassertfalse; __int64 old = *a; *a = b; return old; }
static __int64 juce_InterlockedIncrement64 (volatile __int64* a) throw() { jassertfalse; return ++*a; }
static __int64 juce_InterlockedDecrement64 (volatile __int64* a) throw() { jassertfalse; return --*a; }
template <typename Type> static Type juce_InterlockedExchangeAdd64 (volatile Type* a, Type b) throw() { jassertfalse; Type old = *a; *a += b; return old; }
template <typename Type> static Type juce_InterlockedExchange64 (volatile Type* a, Type b) throw() { jassertfalse; Type old = *a; *a = b; return old; }
template <typename Type> static Type juce_InterlockedIncrement64 (volatile Type* a) throw() { jassertfalse; return ++*a; }
template <typename Type> static Type juce_InterlockedDecrement64 (volatile Type* a) throw() { jassertfalse; return --*a; }
#endif
#endif

View file

@ -657,7 +657,6 @@ int ListBox::getRowNumberOfComponent (Component* const rowComponent) const throw
const Rectangle<int> ListBox::getRowPosition (const int rowNumber,
const bool relativeToComponentTopLeft) const throw()
{
const int rowHeight = getRowHeight();
int y = viewport->getY() + rowHeight * rowNumber;
if (relativeToComponentTopLeft)

View file

@ -579,14 +579,6 @@ public:
*/
virtual void valueChanged();
/** Callback to indicate that the user has just moved the slider.
Note - the valueChanged() method has changed its format and now no longer has
any parameters. Update your code to use the new version.
This version has been left here with an int as its return value to cause
a syntax error if you've got existing code that uses the old version.
*/
virtual int valueChanged (double) { jassertfalse; return 0; }
//==============================================================================
/** Subclasses can override this to convert a text string to a value.

View file

@ -1631,10 +1631,10 @@ void TextEditor::copy()
{
if (passwordCharacter == 0)
{
const String selection (getHighlightedText());
const String selectedText (getHighlightedText());
if (selection.isNotEmpty())
SystemClipboard::copyTextToClipboard (selection);
if (selectedText.isNotEmpty())
SystemClipboard::copyTextToClipboard (selectedText);
}
}

View file

@ -190,11 +190,11 @@ void ToolbarItemComponent::setStyle (const Toolbar::ToolbarItemStyle& newStyle)
}
}
void ToolbarItemComponent::paintButton (Graphics& g, bool isMouseOver, bool isMouseDown)
void ToolbarItemComponent::paintButton (Graphics& g, const bool over, const bool down)
{
if (isBeingUsedAsAButton)
getLookAndFeel().paintToolbarButtonBackground (g, getWidth(), getHeight(),
isMouseOver, isMouseDown, *this);
over, down, *this);
if (toolbarStyle != Toolbar::iconsOnly)
{
@ -218,7 +218,7 @@ void ToolbarItemComponent::paintButton (Graphics& g, bool isMouseOver, bool isMo
g.setOrigin (contentArea.getX(), contentArea.getY());
g.reduceClipRegion (0, 0, contentArea.getWidth(), contentArea.getHeight());
paintButtonArea (g, contentArea.getWidth(), contentArea.getHeight(), isMouseOver, isMouseDown);
paintButtonArea (g, contentArea.getWidth(), contentArea.getHeight(), over, down);
g.restoreState();
}

View file

@ -205,37 +205,40 @@ public:
const int visibleBottom = visibleTop + getParentHeight();
BigInteger itemsToKeep;
TreeViewItem* item = owner.rootItem;
int y = (item != 0 && ! owner.rootItemVisible) ? -item->itemHeight : 0;
while (item != 0 && y < visibleBottom)
{
y += item->itemHeight;
TreeViewItem* item = owner.rootItem;
int y = (item != 0 && ! owner.rootItemVisible) ? -item->itemHeight : 0;
if (y >= visibleTop)
while (item != 0 && y < visibleBottom)
{
const int index = rowComponentIds.indexOf (item->uid);
y += item->itemHeight;
if (index < 0)
if (y >= visibleTop)
{
Component* const comp = item->createItemComponent();
const int index = rowComponentIds.indexOf (item->uid);
if (comp != 0)
if (index < 0)
{
addAndMakeVisible (comp);
itemsToKeep.setBit (rowComponentItems.size());
rowComponentItems.add (item);
rowComponentIds.add (item->uid);
rowComponents.add (comp);
Component* const comp = item->createItemComponent();
if (comp != 0)
{
addAndMakeVisible (comp);
itemsToKeep.setBit (rowComponentItems.size());
rowComponentItems.add (item);
rowComponentIds.add (item->uid);
rowComponents.add (comp);
}
}
else
{
itemsToKeep.setBit (index);
}
}
else
{
itemsToKeep.setBit (index);
}
}
item = item->getNextVisibleItem (true);
item = item->getNextVisibleItem (true);
}
}
for (int i = rowComponentItems.size(); --i >= 0;)
@ -1716,14 +1719,14 @@ const String TreeViewItem::getItemIdentifierString() const
TreeViewItem* TreeViewItem::findItemFromIdentifierString (const String& identifierString)
{
const String uid (getUniqueName());
const String thisId (getUniqueName());
if (uid == identifierString)
if (thisId == identifierString)
return this;
if (identifierString.startsWith (uid + "/"))
if (identifierString.startsWith (thisId + "/"))
{
const String remainingPath (identifierString.substring (uid.length() + 1));
const String remainingPath (identifierString.substring (thisId.length() + 1));
bool wasOpen = isOpen();
setOpen (true);

View file

@ -370,6 +370,8 @@ void FileBrowserComponent::fileDoubleClicked (const File& f)
bool FileBrowserComponent::keyPressed (const KeyPress& key)
{
(void) key;
#if JUCE_LINUX || JUCE_WINDOWS
if (key.getModifiers().isCommandDown()
&& (key.getKeyCode() == 'H' || key.getKeyCode() == 'h'))

View file

@ -2186,13 +2186,13 @@ void Component::internalMouseEnter (MouseInputSource& source, const Point<int>&
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked(i)->mouseEnter (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@ -2258,13 +2258,13 @@ void Component::internalMouseExit (MouseInputSource& source, const Point<int>& r
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseExit (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@ -2425,13 +2425,13 @@ void Component::internalMouseDown (MouseInputSource& source, const Point<int>& r
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseDown (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@ -2494,13 +2494,13 @@ void Component::internalMouseUp (MouseInputSource& source, const Point<int>& rel
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseUp (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@ -2545,13 +2545,13 @@ void Component::internalMouseUp (MouseInputSource& source, const Point<int>& rel
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseDoubleClick (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@ -2611,13 +2611,13 @@ void Component::internalMouseDrag (MouseInputSource& source, const Point<int>& r
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseDrag (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@ -2677,13 +2677,13 @@ void Component::internalMouseMove (MouseInputSource& source, const Point<int>& r
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseMove (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@ -2743,13 +2743,13 @@ void Component::internalMouseWheel (MouseInputSource& source, const Point<int>&
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseWheelMove (me, wheelIncrementX, wheelIncrementY);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);

View file

@ -2084,13 +2084,8 @@ private:
// hierarchies. You might need to give your subclasses a private dummy constructor like
// this one to avoid compiler warnings.
Component (const Component&);
Component& operator= (const Component&);
// (dummy method to cause a deliberate compile error - if you hit this, you need to update your
// subclass to use the new parameters to keyStateChanged)
virtual void keyStateChanged() {};
protected:
/** @internal */
virtual void internalRepaint (int x, int y, int w, int h);

View file

@ -356,10 +356,9 @@ void KeyMappingEditorComponent::resized()
const int buttonHeight = 20;
h -= buttonHeight + 8;
int x = getWidth() - 8;
const int y = h + 6;
resetButton->changeWidthToFitText (buttonHeight);
resetButton->setTopRightPosition (x, y);
resetButton->setTopRightPosition (x, h + 6);
}
tree->setBounds (0, 0, getWidth(), h);
@ -381,7 +380,7 @@ void KeyMappingEditorComponent::buttonClicked (Button* button)
void KeyMappingEditorComponent::changeListenerCallback (void*)
{
ScopedPointer <XmlElement> openness (tree->getOpennessState (true));
ScopedPointer <XmlElement> oldOpenness (tree->getOpennessState (true));
clearSubItems();
@ -400,8 +399,8 @@ void KeyMappingEditorComponent::changeListenerCallback (void*)
addSubItem (new KeyCategoryTreeViewItem (this, categories[i]));
}
if (openness != 0)
tree->restoreOpennessState (*openness);
if (oldOpenness != 0)
tree->restoreOpennessState (*oldOpenness);
}
//==============================================================================

View file

@ -50,14 +50,14 @@ public:
{
}
void paintButton (Graphics& g, bool isMouseOver, bool isMouseDown)
void paintButton (Graphics& g, bool over, bool down)
{
getLookAndFeel()
.drawScrollbarButton (g, owner,
getWidth(), getHeight(),
direction,
owner.isVertical(),
isMouseOver, isMouseDown);
over, down);
}
void clicked()

View file

@ -36,8 +36,8 @@ class TabCompButtonBar : public TabbedButtonBar
{
public:
TabCompButtonBar (TabbedComponent* const owner_,
const TabbedButtonBar::Orientation orientation)
: TabbedButtonBar (orientation),
const TabbedButtonBar::Orientation orientation_)
: TabbedButtonBar (orientation_),
owner (owner_)
{
}

View file

@ -228,7 +228,7 @@ public:
}
/** @internal */
bool hitTest (int x, int y) { return false; }
bool hitTest (int, int) { return false; }
//==============================================================================
juce_UseDebuggingNewOperator

View file

@ -124,12 +124,12 @@ public:
for (int y = 0; y < height; ++y)
{
const float v = 1.0f - y / (float) height;
const float val = 1.0f - y / (float) height;
for (int x = 0; x < width; ++x)
{
const float s = x / (float) width;
const Colour col (h, s, v, 1.0f);
const float sat = x / (float) width;
const Colour col (h, sat, val, 1.0f);
PixelRGB* const pix = (PixelRGB*) pixels.getPixelPointer (x, y);
pix->set (col.getPixelARGB());
@ -149,10 +149,10 @@ public:
void mouseDrag (const MouseEvent& e)
{
const float s = (e.x - edge) / (float) (getWidth() - edge * 2);
const float v = 1.0f - (e.y - edge) / (float) (getHeight() - edge * 2);
const float sat = (e.x - edge) / (float) (getWidth() - edge * 2);
const float val = 1.0f - (e.y - edge) / (float) (getHeight() - edge * 2);
owner->setSV (s, v);
owner->setSV (sat, val);
}
void updateIfNeeded()
@ -486,16 +486,16 @@ void ColourSelector::paint (Graphics& g)
if ((flags & showColourAtTop) != 0)
{
const Colour colour (getCurrentColour());
const Colour currentColour (getCurrentColour());
g.fillCheckerBoard (edgeGap, edgeGap, getWidth() - edgeGap - edgeGap, topSpace - edgeGap - edgeGap,
10, 10,
Colour (0xffdddddd).overlaidWith (colour),
Colour (0xffffffff).overlaidWith (colour));
Colour (0xffdddddd).overlaidWith (currentColour),
Colour (0xffffffff).overlaidWith (currentColour));
g.setColour (Colours::white.overlaidWith (colour).contrasting());
g.setColour (Colours::white.overlaidWith (currentColour).contrasting());
g.setFont (14.0f, true);
g.drawText (colour.toDisplayString ((flags & showAlphaChannel) != 0),
g.drawText (currentColour.toDisplayString ((flags & showAlphaChannel) != 0),
0, edgeGap, getWidth(), topSpace - edgeGap * 2,
Justification::centred, false);
}

View file

@ -204,7 +204,7 @@ void MidiKeyboardComponent::setVelocity (const float velocity_, const bool useMo
}
//==============================================================================
void MidiKeyboardComponent::getKeyPosition (int midiNoteNumber, const float keyWidth, int& x, int& w) const
void MidiKeyboardComponent::getKeyPosition (int midiNoteNumber, const float keyWidth_, int& x, int& w) const
{
jassert (midiNoteNumber >= 0 && midiNoteNumber < 128);
@ -227,8 +227,8 @@ void MidiKeyboardComponent::getKeyPosition (int midiNoteNumber, const float keyW
const int octave = midiNoteNumber / 12;
const int note = midiNoteNumber % 12;
x = roundToInt (octave * 7.0f * keyWidth + notePos [note] * keyWidth);
w = roundToInt (widths [note] * keyWidth);
x = roundToInt (octave * 7.0f * keyWidth_ + notePos [note] * keyWidth_);
w = roundToInt (widths [note] * keyWidth_);
}
void MidiKeyboardComponent::getKeyPos (int midiNoteNumber, int& x, int& w) const
@ -551,7 +551,7 @@ const String MidiKeyboardComponent::getWhiteNoteText (const int midiNoteNumber)
}
void MidiKeyboardComponent::drawUpDownButton (Graphics& g, int w, int h,
const bool isMouseOver,
const bool isMouseOver_,
const bool isButtonDown,
const bool movesOctavesUp)
{
@ -574,7 +574,7 @@ void MidiKeyboardComponent::drawUpDownButton (Graphics& g, int w, int h,
path.applyTransform (AffineTransform::rotation (float_Pi * 2.0f * angle, 0.5f, 0.5f));
g.setColour (findColour (upDownButtonArrowColourId)
.withAlpha (isButtonDown ? 1.0f : (isMouseOver ? 0.6f : 0.4f)));
.withAlpha (isButtonDown ? 1.0f : (isMouseOver_ ? 0.6f : 0.4f)));
g.fillPath (path, path.getTransformToScaleToFit (1.0f, 1.0f,
w - 2.0f,

View file

@ -297,9 +297,9 @@ private:
AlertTextComp& operator= (const AlertTextComp&);
};
void AlertWindow::addTextBlock (const String& text)
void AlertWindow::addTextBlock (const String& textBlock)
{
AlertTextComp* const c = new AlertTextComp (text, font);
AlertTextComp* const c = new AlertTextComp (textBlock, font);
textBlocks.add (c);
allComps.add (c);
@ -519,7 +519,7 @@ void AlertWindow::updateLayout (const bool onlyIncreaseSize)
for (i = 0; i < allComps.size(); ++i)
{
Component* const c = (Component*) allComps[i];
int h = 22;
h = 22;
const int comboIndex = comboBoxes.indexOf (c);
if (comboIndex >= 0 && comboBoxNames [comboIndex].isNotEmpty())
@ -601,10 +601,10 @@ bool AlertWindow::keyPressed (const KeyPress& key)
void AlertWindow::lookAndFeelChanged()
{
const int flags = getLookAndFeel().getAlertBoxWindowFlags();
const int newFlags = getLookAndFeel().getAlertBoxWindowFlags();
setUsingNativeTitleBar ((flags & ComponentPeer::windowHasTitleBar) != 0);
setDropShadowEnabled (isOpaque() && (flags & ComponentPeer::windowHasDropShadow) != 0);
setUsingNativeTitleBar ((newFlags & ComponentPeer::windowHasTitleBar) != 0);
setDropShadowEnabled (isOpaque() && (newFlags & ComponentPeer::windowHasDropShadow) != 0);
}
int AlertWindow::getDesktopWindowStyleFlags() const

View file

@ -304,18 +304,18 @@ Button* DocumentWindow::getMaximiseButton() const throw()
int DocumentWindow::getDesktopWindowStyleFlags() const
{
int flags = ResizableWindow::getDesktopWindowStyleFlags();
int styleFlags = ResizableWindow::getDesktopWindowStyleFlags();
if ((requiredButtons & minimiseButton) != 0)
flags |= ComponentPeer::windowHasMinimiseButton;
styleFlags |= ComponentPeer::windowHasMinimiseButton;
if ((requiredButtons & maximiseButton) != 0)
flags |= ComponentPeer::windowHasMaximiseButton;
styleFlags |= ComponentPeer::windowHasMaximiseButton;
if ((requiredButtons & closeButton) != 0)
flags |= ComponentPeer::windowHasCloseButton;
styleFlags |= ComponentPeer::windowHasCloseButton;
return flags;
return styleFlags;
}
void DocumentWindow::lookAndFeelChanged()

View file

@ -88,12 +88,12 @@ ResizableWindow::~ResizableWindow()
int ResizableWindow::getDesktopWindowStyleFlags() const
{
int flags = TopLevelWindow::getDesktopWindowStyleFlags();
int styleFlags = TopLevelWindow::getDesktopWindowStyleFlags();
if (isResizable() && (flags & ComponentPeer::windowHasTitleBar) != 0)
flags |= ComponentPeer::windowIsResizable;
if (isResizable() && (styleFlags & ComponentPeer::windowHasTitleBar) != 0)
styleFlags |= ComponentPeer::windowIsResizable;
return flags;
return styleFlags;
}
//==============================================================================

View file

@ -202,15 +202,15 @@ void TopLevelWindow::visibilityChanged()
int TopLevelWindow::getDesktopWindowStyleFlags() const
{
int flags = ComponentPeer::windowAppearsOnTaskbar;
int styleFlags = ComponentPeer::windowAppearsOnTaskbar;
if (useDropShadow)
flags |= ComponentPeer::windowHasDropShadow;
styleFlags |= ComponentPeer::windowHasDropShadow;
if (useNativeTitleBar)
flags |= ComponentPeer::windowHasTitleBar;
styleFlags |= ComponentPeer::windowHasTitleBar;
return flags;
return styleFlags;
}
void TopLevelWindow::setDropShadowEnabled (const bool useShadow)

View file

@ -734,8 +734,8 @@ private:
gradient.isRadial = fillXml->hasTagName ("radialGradient");
float width = viewBoxW;
float height = viewBoxH;
float gradientWidth = viewBoxW;
float gradientHeight = viewBoxH;
float dx = 0.0f;
float dy = 0.0f;
@ -746,16 +746,16 @@ private:
const Rectangle<float> bounds (path.getBounds());
dx = bounds.getX();
dy = bounds.getY();
width = bounds.getWidth();
height = bounds.getHeight();
gradientWidth = bounds.getWidth();
gradientHeight = bounds.getHeight();
}
if (gradient.isRadial)
{
gradient.x1 = dx + getCoordLength (fillXml->getStringAttribute ("cx", "50%"), width);
gradient.y1 = dy + getCoordLength (fillXml->getStringAttribute ("cy", "50%"), height);
gradient.x1 = dx + getCoordLength (fillXml->getStringAttribute ("cx", "50%"), gradientWidth);
gradient.y1 = dy + getCoordLength (fillXml->getStringAttribute ("cy", "50%"), gradientHeight);
const float radius = getCoordLength (fillXml->getStringAttribute ("r", "50%"), width);
const float radius = getCoordLength (fillXml->getStringAttribute ("r", "50%"), gradientWidth);
gradient.x2 = gradient.x1 + radius;
gradient.y2 = gradient.y1;
@ -764,11 +764,11 @@ private:
}
else
{
gradient.x1 = dx + getCoordLength (fillXml->getStringAttribute ("x1", "0%"), width);
gradient.y1 = dy + getCoordLength (fillXml->getStringAttribute ("y1", "0%"), height);
gradient.x1 = dx + getCoordLength (fillXml->getStringAttribute ("x1", "0%"), gradientWidth);
gradient.y1 = dy + getCoordLength (fillXml->getStringAttribute ("y1", "0%"), gradientHeight);
gradient.x2 = dx + getCoordLength (fillXml->getStringAttribute ("x2", "100%"), width);
gradient.y2 = dy + getCoordLength (fillXml->getStringAttribute ("y2", "0%"), height);
gradient.x2 = dx + getCoordLength (fillXml->getStringAttribute ("x2", "100%"), gradientWidth);
gradient.y2 = dy + getCoordLength (fillXml->getStringAttribute ("y2", "0%"), gradientHeight);
if (gradient.x1 == gradient.x2 && gradient.y1 == gradient.y2)
return Colour (gradient.getColour (gradient.getNumColours() - 1));
@ -791,7 +791,7 @@ private:
const PathStrokeType getStrokeFor (const XmlElement* const xml) const
{
const String width (getStyleAttribute (xml, "stroke-width"));
const String strokeWidth (getStyleAttribute (xml, "stroke-width"));
const String cap (getStyleAttribute (xml, "stroke-linecap"));
const String join (getStyleAttribute (xml, "stroke-linejoin"));
@ -814,10 +814,10 @@ private:
float ox = 0.0f, oy = 0.0f;
transform.transformPoint (ox, oy);
float x = getCoordLength (width, viewBoxW), y = 0.0f;
float x = getCoordLength (strokeWidth, viewBoxW), y = 0.0f;
transform.transformPoint (x, y);
return PathStrokeType (width.isNotEmpty() ? juce_hypotf (x - ox, y - oy) : 1.0f,
return PathStrokeType (strokeWidth.isNotEmpty() ? juce_hypotf (x - ox, y - oy) : 1.0f,
joinStyle, capStyle);
}

View file

@ -44,6 +44,8 @@ namespace FontValues
}
static const float defaultFontHeight = 14.0f;
static String fallbackFont;
}
//==============================================================================
@ -166,16 +168,14 @@ void Font::setTypefaceName (const String& faceName) throw()
}
//==============================================================================
static String fallbackFont;
const String Font::getFallbackFontName() throw()
{
return fallbackFont;
return FontValues::fallbackFont;
}
void Font::setFallbackFontName (const String& name) throw()
{
fallbackFont = name;
FontValues::fallbackFont = name;
}
//==============================================================================

View file

@ -1329,9 +1329,9 @@ void Path::loadPathFromStream (InputStream& source)
}
}
void Path::loadPathFromData (const void* const data, const int numberOfBytes)
void Path::loadPathFromData (const void* const pathData, const int numberOfBytes)
{
MemoryInputStream in (data, numberOfBytes, false);
MemoryInputStream in (pathData, numberOfBytes, false);
loadPathFromStream (in);
}

View file

@ -482,12 +482,12 @@ public:
transform.transformPoint (x3, y3);
transform.transformPoint (x4, y4);
const float x = jmin (x1, x2, x3, x4);
const float y = jmin (y1, y2, y3, y4);
const float rx = jmin (x1, x2, x3, x4);
const float ry = jmin (y1, y2, y3, y4);
return Rectangle (x, y,
jmax (x1, x2, x3, x4) - x,
jmax (y1, y2, y3, y4) - y);
return Rectangle (rx, ry,
jmax (x1, x2, x3, x4) - rx,
jmax (y1, y2, y3, y4) - ry);
}
/** Returns the smallest integer-aligned rectangle that completely contains this one.

View file

@ -338,7 +338,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
*/
METHODDEF(boolean)
compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
compress_output (j_compress_ptr cinfo, JSAMPIMAGE)
{
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
JDIMENSION MCU_col_num; /* index of current MCU within row */

View file

@ -338,7 +338,7 @@ null_convert (j_compress_ptr cinfo,
*/
METHODDEF(void)
null_method (j_compress_ptr cinfo)
null_method (j_compress_ptr)
{
/* no work needed */
}

View file

@ -152,7 +152,7 @@ emit_dht (j_compress_ptr cinfo, int index, boolean is_ac)
LOCAL(void)
emit_dac (j_compress_ptr cinfo)
emit_dac (j_compress_ptr)
/* Emit a DAC marker */
/* Since the useful info is so small, we want to emit all the tables in */
/* one DAC marker. Therefore this routine does its own scan of the table. */

View file

@ -72,7 +72,7 @@ typedef my_downsampler * my_downsample_ptr;
*/
METHODDEF(void)
start_pass_downsample (j_compress_ptr cinfo)
start_pass_downsample (j_compress_ptr)
{
/* no work for now */
}

View file

@ -275,7 +275,7 @@ start_pass_coef2 (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
*/
METHODDEF(boolean)
compress_output2 (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
compress_output2 (j_compress_ptr cinfo, JSAMPIMAGE)
{
my_coef_ptr2 coef = (my_coef_ptr2) cinfo->coef;
JDIMENSION MCU_col_num; /* index of current MCU within row */

View file

@ -166,7 +166,7 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
*/
METHODDEF(void)
term_source (j_decompress_ptr cinfo)
term_source (j_decompress_ptr)
{
/* no work necessary here */
}

View file

@ -225,7 +225,7 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
*/
METHODDEF(int)
dummy_consume_data (j_decompress_ptr cinfo)
dummy_consume_data (j_decompress_ptr)
{
return JPEG_SUSPENDED; /* Always indicate nothing was done */
}

View file

@ -290,7 +290,7 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
*/
METHODDEF(void)
start_pass_dcolor (j_decompress_ptr cinfo)
start_pass_dcolor (j_decompress_ptr)
{
/* no work needed */
}

View file

@ -143,7 +143,7 @@ start_pass_merged_upsample (j_decompress_ptr cinfo)
METHODDEF(void)
merged_2v_upsample (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JDIMENSION,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
/* 2:1 vertical sampling case: may need a spare row. */
@ -192,9 +192,9 @@ merged_2v_upsample (j_decompress_ptr cinfo,
METHODDEF(void)
merged_1v_upsample (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JDIMENSION,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
JDIMENSION)
/* 1:1 vertical sampling case: much easier, never need a spare row. */
{
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;

View file

@ -158,8 +158,8 @@ METHODDEF(void)
post_process_prepass (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
JSAMPARRAY, JDIMENSION *out_row_ctr,
JDIMENSION)
{
my_post_ptr post = (my_post_ptr) cinfo->post;
JDIMENSION old_next_row, num_rows;
@ -200,8 +200,8 @@ post_process_prepass (j_decompress_ptr cinfo,
METHODDEF(void)
post_process_2pass (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JSAMPIMAGE, JDIMENSION *,
JDIMENSION,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
{

View file

@ -88,7 +88,7 @@ start_pass_upsample (j_decompress_ptr cinfo)
METHODDEF(void)
sep_upsample (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JDIMENSION,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
{
@ -154,7 +154,7 @@ sep_upsample (j_decompress_ptr cinfo,
*/
METHODDEF(void)
fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
fullsize_upsample (j_decompress_ptr, jpeg_component_info *,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
*output_data_ptr = input_data;
@ -167,8 +167,8 @@ fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
*/
METHODDEF(void)
noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
noop_upsample (j_decompress_ptr, jpeg_component_info *,
JSAMPARRAY, JSAMPARRAY * output_data_ptr)
{
*output_data_ptr = NULL; /* safety check */
}
@ -230,7 +230,7 @@ int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
*/
METHODDEF(void)
h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info *,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
JSAMPARRAY output_data = *output_data_ptr;
@ -258,7 +258,7 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
*/
METHODDEF(void)
h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info *,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
JSAMPARRAY output_data = *output_data_ptr;

View file

@ -32,13 +32,13 @@ extern void free JPP((void *ptr));
*/
GLOBAL(void *)
jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
jpeg_get_small (j_common_ptr , size_t sizeofobject)
{
return (void *) malloc(sizeofobject);
}
GLOBAL(void)
jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
jpeg_free_small (j_common_ptr , void * object, size_t)
{
free(object);
}
@ -52,13 +52,13 @@ jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
*/
GLOBAL(void FAR *)
jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
jpeg_get_large (j_common_ptr, size_t sizeofobject)
{
return (void FAR *) malloc(sizeofobject);
}
GLOBAL(void)
jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
jpeg_free_large (j_common_ptr, void FAR * object, size_t)
{
free(object);
}
@ -70,8 +70,8 @@ jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
*/
GLOBAL(long)
jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
long max_bytes_needed, long already_allocated)
jpeg_mem_available (j_common_ptr, long,
long max_bytes_needed, long)
{
return max_bytes_needed;
}
@ -84,8 +84,8 @@ jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
*/
GLOBAL(void)
jpeg_open_backing_store (j_common_ptr cinfo, struct backing_store_struct *info,
long total_bytes_needed)
jpeg_open_backing_store (j_common_ptr cinfo, struct backing_store_struct *,
long )
{
ERREXIT(cinfo, JERR_NO_BACKING_STORE);
}
@ -97,13 +97,13 @@ jpeg_open_backing_store (j_common_ptr cinfo, struct backing_store_struct *info,
*/
GLOBAL(long)
jpeg_mem_init (j_common_ptr cinfo)
jpeg_mem_init (j_common_ptr)
{
return 0; /* just set max_memory_to_use to 0 */
}
GLOBAL(void)
jpeg_mem_term (j_common_ptr cinfo)
jpeg_mem_term (j_common_ptr)
{
/* no work */
}

View file

@ -242,7 +242,7 @@ select_ncolors (j_decompress_ptr cinfo, int Ncolors[])
LOCAL(int)
output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
output_value (j_decompress_ptr, int, int j, int maxj)
/* Return j'th output value, where j will range from 0 to maxj */
/* The output values must fall in 0..MAXJSAMPLE in increasing order */
{
@ -256,7 +256,7 @@ output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
LOCAL(int)
largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
largest_input_value (j_decompress_ptr, int, int j, int maxj)
/* Return largest input value that should map to j'th output value */
/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
{
@ -738,7 +738,7 @@ alloc_fs_workspace (j_decompress_ptr cinfo)
*/
METHODDEF(void)
start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
start_pass_1_quant (j_decompress_ptr cinfo, boolean)
{
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
size_t arraysize;
@ -795,7 +795,7 @@ start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
*/
METHODDEF(void)
finish_pass_1_quant (j_decompress_ptr cinfo)
finish_pass_1_quant (j_decompress_ptr)
{
/* no work in 1-pass case */
}

View file

@ -222,7 +222,7 @@ typedef my_cquantizer2 * my_cquantize_ptr2;
METHODDEF(void)
prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
JSAMPARRAY output_buf, int num_rows)
JSAMPARRAY, int num_rows)
{
my_cquantize_ptr2 cquantize = (my_cquantize_ptr2) cinfo->cquantize;
register JSAMPROW ptr;
@ -1153,7 +1153,7 @@ finish_pass1 (j_decompress_ptr cinfo)
METHODDEF(void)
finish_pass2 (j_decompress_ptr cinfo)
finish_pass2 (j_decompress_ptr)
{
/* no work */
}

View file

@ -729,7 +729,7 @@ trim_bottom_edge (j_compress_ptr dstinfo)
*/
GLOBAL(jvirt_barray_ptr *)
jtransform_adjust_parameters (j_decompress_ptr srcinfo,
jtransform_adjust_parameters (j_decompress_ptr,
j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays,
jpeg_transform_info *info)
@ -884,7 +884,7 @@ jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option)
GLOBAL(void)
jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
JCOPY_OPTION option)
JCOPY_OPTION)
{
jpeg_saved_marker_ptr marker;

View file

@ -208,7 +208,7 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
* error function pointer in png_set_error_fn().
*/
static void /* PRIVATE */
png_default_error(png_structp png_ptr, png_const_charp error_message)
png_default_error(png_structp, png_const_charp error_message)
{
#ifndef PNG_NO_CONSOLE_IO
#ifdef PNG_ERROR_NUMBERS_SUPPORTED

View file

@ -2723,7 +2723,7 @@ png_do_read_interlace(png_structp png_ptr)
#endif /* PNG_READ_INTERLACING_SUPPORTED */
void /* PRIVATE */
png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
png_read_filter_row(png_structp, png_row_infop row_info, png_bytep row,
png_bytep prev_row, int filter)
{
png_debug(1, "in png_read_filter_row\n");

View file

@ -1204,7 +1204,7 @@ png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
/* function was added to libpng 1.2.0 and should always exist by default */
void PNGAPI
png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
png_set_asm_flags (png_structp png_ptr, png_uint_32)
{
/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */
if (png_ptr != NULL)
@ -1214,8 +1214,8 @@ png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
/* this function was added to libpng 1.2.0 */
void PNGAPI
png_set_mmx_thresholds (png_structp png_ptr,
png_byte mmx_bitdepth_threshold,
png_uint_32 mmx_rowbytes_threshold)
png_byte,
png_uint_32)
{
/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */
if (png_ptr == NULL)

View file

@ -292,7 +292,7 @@ void File::getFileTimesInternal (int64& modificationTime, int64& accessTime, int
}
}
bool File::setFileTimesInternal (int64 modificationTime, int64 accessTime, int64 creationTime) const
bool File::setFileTimesInternal (int64 modificationTime, int64 accessTime, int64 /*creationTime*/) const
{
struct utimbuf times;
times.actime = (time_t) (accessTime / 1000);

View file

@ -54,7 +54,7 @@ public:
virtual HIViewRef attachView (WindowRef windowRef, HIViewRef rootView) = 0;
virtual void removeView (HIViewRef embeddedView) = 0;
virtual void mouseDown (int x, int y) {}
virtual void mouseDown (int, int) {}
virtual void paint() {}
virtual bool getEmbeddedViewSize (int& w, int& h)
@ -224,7 +224,7 @@ public:
recursiveHIViewRepaint (HIViewGetRoot (wrapperWindow));
}
OSStatus carbonEventHandler (EventHandlerCallRef nextHandlerRef,
OSStatus carbonEventHandler (EventHandlerCallRef /*nextHandlerRef*/,
EventRef event)
{
switch (GetEventKind (event))

View file

@ -338,7 +338,7 @@ public:
{
StringArray s;
HeapBlock <OSType> types;
const int num = getAllDataSourcesForDevice (deviceID, input, types);
const int num = getAllDataSourcesForDevice (deviceID, types);
for (int i = 0; i < num; ++i)
{
@ -383,7 +383,7 @@ public:
if (OK (AudioObjectGetPropertyData (deviceID, &pa, 0, 0, &size, &currentSourceID)))
{
HeapBlock <OSType> types;
const int num = getAllDataSourcesForDevice (deviceID, input, types);
const int num = getAllDataSourcesForDevice (deviceID, types);
for (int i = 0; i < num; ++i)
{
@ -404,7 +404,7 @@ public:
if (deviceID != 0)
{
HeapBlock <OSType> types;
const int num = getAllDataSourcesForDevice (deviceID, input, types);
const int num = getAllDataSourcesForDevice (deviceID, types);
if (((unsigned int) index) < (unsigned int) num)
{
@ -798,12 +798,12 @@ private:
CoreAudioInternal& operator= (const CoreAudioInternal&);
//==============================================================================
static OSStatus audioIOProc (AudioDeviceID inDevice,
const AudioTimeStamp* inNow,
static OSStatus audioIOProc (AudioDeviceID /*inDevice*/,
const AudioTimeStamp* /*inNow*/,
const AudioBufferList* inInputData,
const AudioTimeStamp* inInputTime,
const AudioTimeStamp* /*inInputTime*/,
AudioBufferList* outOutputData,
const AudioTimeStamp* inOutputTime,
const AudioTimeStamp* /*inOutputTime*/,
void* device)
{
static_cast <CoreAudioInternal*> (device)->audioCallback (inInputData, outOutputData);
@ -837,7 +837,7 @@ private:
}
//==============================================================================
static int getAllDataSourcesForDevice (AudioDeviceID deviceID, const bool input, HeapBlock <OSType>& types)
static int getAllDataSourcesForDevice (AudioDeviceID deviceID, HeapBlock <OSType>& types)
{
AudioObjectPropertyAddress pa;
pa.mSelector = kAudioDevicePropertyDataSources;

View file

@ -225,7 +225,7 @@ public:
AffineTransform t (AffineTransform::scale (1.0f, -1.0f).translated (0, sourceImage.getHeight()).followedBy (transform));
applyTransform (t);
CGRect r = CGRectMake (0, 0, sourceImage.getWidth(), sourceImage.getHeight());
CGRect r = CGRectMake (srcClip.getX(), srcClip.getY(), srcClip.getWidth(), srcClip.getHeight());
CGContextClipToMask (context, r, image);
applyTransform (t.inverted());

View file

@ -315,12 +315,12 @@ void MidiOutput::reset()
{
}
bool MidiOutput::getVolume (float& leftVol, float& rightVol)
bool MidiOutput::getVolume (float& /*leftVol*/, float& /*rightVol*/)
{
return false;
}
void MidiOutput::setVolume (float leftVol, float rightVol)
void MidiOutput::setVolume (float /*leftVol*/, float /*rightVol*/)
{
}
@ -476,7 +476,7 @@ namespace CoreMidiCallbacks
static void midiInputProc (const MIDIPacketList* pktlist,
void* readProcRefCon,
void* srcConnRefCon)
void* /*srcConnRefCon*/)
{
double time = Time::getMillisecondCounterHiRes() * 0.001;
const double originalTime = time;
@ -658,12 +658,12 @@ void MidiOutput::reset()
{
}
bool MidiOutput::getVolume (float& leftVol, float& rightVol)
bool MidiOutput::getVolume (float& /*leftVol*/, float& /*rightVol*/)
{
return false;
}
void MidiOutput::setVolume (float leftVol, float rightVol)
void MidiOutput::setVolume (float /*leftVol*/, float /*rightVol*/)
{
}

View file

@ -66,6 +66,7 @@ using namespace JUCE_NAMESPACE;
- (BOOL) panel: (id) sender shouldShowFilename: (NSString*) filename
{
(void) sender;
const File f (nsStringToJuce (filename));
for (int i = filters->size(); --i >= 0;)

View file

@ -412,6 +412,8 @@ END_JUCE_NAMESPACE
- (void) menuNeedsUpdate: (NSMenu*) menu;
{
(void) menu;
if (JuceMainMenuHandler::instance != 0)
JuceMainMenuHandler::instance->updateMenus();
}

View file

@ -236,31 +236,37 @@ using namespace JUCE_NAMESPACE;
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication*) app
{
(void) app;
return redirector->shouldTerminate();
}
- (BOOL) application: (NSApplication*) app openFile: (NSString*) filename
{
(void) app;
return redirector->openFile (filename);
}
- (void) application: (NSApplication*) sender openFiles: (NSArray*) filenames
{
(void) sender;
return redirector->openFiles (filenames);
}
- (void) applicationDidBecomeActive: (NSNotification*) aNotification
- (void) applicationDidBecomeActive: (NSNotification*) notification
{
(void) notification;
redirector->focusChanged();
}
- (void) applicationDidResignActive: (NSNotification*) aNotification
- (void) applicationDidResignActive: (NSNotification*) notification
{
(void) notification;
redirector->focusChanged();
}
- (void) applicationWillUnhide: (NSNotification*) aNotification
- (void) applicationWillUnhide: (NSNotification*) notification
{
(void) notification;
redirector->focusChanged();
}

View file

@ -85,7 +85,7 @@ bool AlertWindow::showNativeDialogBox (const String& title,
}
//==============================================================================
bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles)
bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool /*canMoveFiles*/)
{
if (files.size() == 0)
return false;
@ -140,7 +140,7 @@ bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& fi
return true;
}
bool DragAndDropContainer::performExternalDragDropOfText (const String& text)
bool DragAndDropContainer::performExternalDragDropOfText (const String& /*text*/)
{
jassertfalse // not implemented!
return false;

View file

@ -106,7 +106,7 @@ void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType ty
return c;
}
void MouseCursor::deleteMouseCursor (void* const cursorHandle, const bool isStandard)
void MouseCursor::deleteMouseCursor (void* const cursorHandle, const bool /*isStandard*/)
{
[((NSCursor*) cursorHandle) release];
}

View file

@ -145,7 +145,7 @@ void* NSViewComponent::getView() const
return info == 0 ? 0 : info->view;
}
void NSViewComponent::paint (Graphics& g)
void NSViewComponent::paint (Graphics&)
{
}

View file

@ -421,11 +421,13 @@ END_JUCE_NAMESPACE
- (BOOL) acceptsFirstMouse: (NSEvent*) ev
{
(void) ev;
return YES;
}
- (void) frameChanged: (NSNotification*) n
{
(void) n;
if (owner != 0)
owner->redirectMovedOrResized();
}
@ -483,10 +485,13 @@ END_JUCE_NAMESPACE
- (void) doCommandBySelector: (SEL) aSelector
{
(void) aSelector;
}
- (void) setMarkedText: (id) aString selectedRange: (NSRange) selectionRange
{
(void) selectionRange;
if (stringBeingComposed == 0)
stringBeingComposed = new String();
@ -567,6 +572,7 @@ END_JUCE_NAMESPACE
- (NSRect) firstRectForCharacterRange: (NSRange) theRange
{
(void) theRange;
JUCE_NAMESPACE::Component* const comp = dynamic_cast <JUCE_NAMESPACE::Component*> (owner->findCurrentTextInputTarget());
if (comp == 0)
@ -582,6 +588,7 @@ END_JUCE_NAMESPACE
- (unsigned int) characterIndexForPoint: (NSPoint) thePoint
{
(void) thePoint;
return NSNotFound;
}
@ -667,6 +674,7 @@ END_JUCE_NAMESPACE
- (BOOL) prepareForDragOperation: (id <NSDraggingInfo>) sender
{
(void) sender;
return YES;
}
@ -677,6 +685,7 @@ END_JUCE_NAMESPACE
- (void) concludeDragOperation: (id <NSDraggingInfo>) sender
{
(void) sender;
}
@end
@ -705,11 +714,13 @@ END_JUCE_NAMESPACE
- (BOOL) windowShouldClose: (id) window
{
(void) window;
return owner == 0 || owner->windowShouldClose();
}
- (NSRect) constrainFrameRect: (NSRect) frameRect toScreen: (NSScreen*) screen
{
(void) screen;
if (owner != 0)
frameRect = owner->constrainRect (frameRect);
@ -718,6 +729,7 @@ END_JUCE_NAMESPACE
- (NSSize) windowWillResize: (NSWindow*) window toSize: (NSSize) proposedFrameSize
{
(void) window;
if (isZooming)
return proposedFrameSize;
@ -740,6 +752,8 @@ END_JUCE_NAMESPACE
- (void) windowWillMove: (NSNotification*) notification
{
(void) notification;
if (JUCE_NAMESPACE::Component::getCurrentlyModalComponent() != 0
&& owner->getComponent()->isCurrentlyBlockedByAnotherModalComponent()
&& (owner->getStyleFlags() & JUCE_NAMESPACE::ComponentPeer::windowHasTitleBar) != 0)

View file

@ -236,8 +236,9 @@ public:
runLoopThread->signalThreadShouldExit();
}
- (void) connection: (NSURLConnection*) connection didReceiveResponse: (NSURLResponse*) response
- (void) connection: (NSURLConnection*) conn didReceiveResponse: (NSURLResponse*) response
{
(void) conn;
[dataLock lock];
[data setLength: 0];
[dataLock unlock];
@ -245,8 +246,9 @@ public:
contentLength = [response expectedContentLength];
}
- (void) connection: (NSURLConnection*) connection didFailWithError: (NSError*) error
- (void) connection: (NSURLConnection*) conn didFailWithError: (NSError*) error
{
(void) conn;
DBG (nsStringToJuce ([error description]));
hasFailed = true;
initialised = true;
@ -255,16 +257,18 @@ public:
runLoopThread->signalThreadShouldExit();
}
- (void) connection: (NSURLConnection*) connection didReceiveData: (NSData*) newData
- (void) connection: (NSURLConnection*) conn didReceiveData: (NSData*) newData
{
(void) conn;
[dataLock lock];
[data appendData: newData];
[dataLock unlock];
initialised = true;
}
- (void) connectionDidFinishLoading: (NSURLConnection*) connection
- (void) connectionDidFinishLoading: (NSURLConnection*) conn
{
(void) conn;
hasFinished = true;
initialised = true;
@ -412,7 +416,7 @@ int64 juce_getInternetFileContentLength (void* handle)
return -1;
}
int juce_seekInInternetFile (void* handle, int newPosition)
int juce_seekInInternetFile (void* handle, int /*newPosition*/)
{
JuceURLConnection* const s = (JuceURLConnection*) handle;

View file

@ -88,7 +88,7 @@ void Thread::yield()
sched_yield();
}
void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
void Thread::setCurrentThreadAffinityMask (const uint32 /*affinityMask*/)
{
// xxx
jassertfalse
@ -119,7 +119,7 @@ void Process::terminate()
exit (0);
}
void Process::setPriority (ProcessPriority p)
void Process::setPriority (ProcessPriority)
{
// xxx
}

View file

@ -63,6 +63,10 @@ END_JUCE_NAMESPACE
frame: (WebFrame*) frame
decisionListener: (id <WebPolicyDecisionListener>) listener
{
(void) sender;
(void) request;
(void) frame;
NSURL* url = [actionInformation valueForKey: @"WebActionOriginalURLKey"];
if (ownerComponent->pageAboutToLoad (nsStringToJuce ([url absoluteString])))
@ -214,7 +218,7 @@ void WebBrowserComponent::refresh()
}
//==============================================================================
void WebBrowserComponent::paint (Graphics& g)
void WebBrowserComponent::paint (Graphics&)
{
}
@ -263,7 +267,7 @@ void WebBrowserComponent::visibilityChanged()
checkWindowAssociation();
}
bool WebBrowserComponent::pageAboutToLoad (const String& url)
bool WebBrowserComponent::pageAboutToLoad (const String&)
{
return true;
}

View file

@ -824,9 +824,9 @@ void XmlElement::insertChildElement (XmlElement* const newNode,
}
}
XmlElement* XmlElement::createNewChildElement (const String& tagName)
XmlElement* XmlElement::createNewChildElement (const String& childTagName)
{
XmlElement* const newElement = new XmlElement (tagName);
XmlElement* const newElement = new XmlElement (childTagName);
addChildElement (newElement);
return newElement;
}

View file

@ -171,10 +171,10 @@ bool PropertiesFile::needsToBeSaved() const
return needsWriting;
}
void PropertiesFile::setNeedsToBeSaved (const bool needsToBeSaved)
void PropertiesFile::setNeedsToBeSaved (const bool needsToBeSaved_)
{
const ScopedLock sl (getLock());
needsWriting = needsToBeSaved;
needsWriting = needsToBeSaved_;
}
bool PropertiesFile::save()

View file

@ -291,14 +291,14 @@ public:
For example, if the item is an object, you might want to call it and tell
it that it's being selected.
*/
virtual void itemSelected (SelectableItemType item) {}
virtual void itemSelected (SelectableItemType item) { (void) item; }
/** Can be overridden to do special handling when an item is deselected.
For example, if the item is an object, you might want to call it and tell
it that it's being deselected.
*/
virtual void itemDeselected (SelectableItemType item) {}
virtual void itemDeselected (SelectableItemType item) { (void) item; }
/** Used internally, but can be called to force a change message to be sent to the ChangeListeners.
*/