mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Clang: Fix warnings when building with clang 10
This commit is contained in:
parent
286bb40a9e
commit
394c4fd475
144 changed files with 896 additions and 839 deletions
|
|
@ -88,11 +88,15 @@ struct Test
|
|||
std::unique_ptr<b2World> m_world { new b2World (b2Vec2 (0.0f, -10.0f)) };
|
||||
};
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wimplicit-int-float-conversion")
|
||||
|
||||
#include "../Assets/Box2DTests/AddPair.h"
|
||||
#include "../Assets/Box2DTests/ApplyForce.h"
|
||||
#include "../Assets/Box2DTests/Dominos.h"
|
||||
#include "../Assets/Box2DTests/Chain.h"
|
||||
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
|
||||
//==============================================================================
|
||||
/** This list box just displays a StringArray and broadcasts a change message when the
|
||||
selected row changes.
|
||||
|
|
@ -118,7 +122,7 @@ public:
|
|||
lf.findColour (ListBox::backgroundColourId)));
|
||||
|
||||
g.setColour (lf.findColour (ListBox::textColourId));
|
||||
g.setFont (h * 0.7f);
|
||||
g.setFont ((float) h * 0.7f);
|
||||
g.drawText (tests[row], Rectangle<int> (0, 0, w, h).reduced (2),
|
||||
Justification::centredLeft, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ public:
|
|||
Rectangle<int> r (0, 0, w, h);
|
||||
|
||||
auto& lf = Desktop::getInstance().getDefaultLookAndFeel();
|
||||
g.setColour (lf.findColour (isSelected ? TextEditor::highlightColourId : ListBox::backgroundColourId));
|
||||
g.setColour (lf.findColour (isSelected ? (int) TextEditor::highlightColourId : (int) ListBox::backgroundColourId));
|
||||
g.fillRect (r);
|
||||
|
||||
g.setColour (lf.findColour (ListBox::textColourId));
|
||||
|
|
@ -461,7 +461,7 @@ public:
|
|||
auto r = Rectangle<int> (0, 0, w, h).reduced (4);
|
||||
|
||||
auto& lf = Desktop::getInstance().getDefaultLookAndFeel();
|
||||
g.setColour (lf.findColour (isSelected ? TextEditor::highlightColourId : ListBox::backgroundColourId));
|
||||
g.setColour (lf.findColour (isSelected ? (int) TextEditor::highlightColourId : (int) ListBox::backgroundColourId));
|
||||
g.fillRect (r);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ private:
|
|||
{
|
||||
const ScopedLock lock (drawing);
|
||||
|
||||
parentWidth = comp.getWidth() - size;
|
||||
parentHeight = comp.getHeight() - size;
|
||||
parentWidth = (float) comp.getWidth() - size;
|
||||
parentHeight = (float) comp.getHeight() - size;
|
||||
}
|
||||
|
||||
float x = 0.0f, y = 0.0f,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
// use a "colour" attribute in the xml tag for this node to set the text colour..
|
||||
g.setColour (Colour::fromString (xml.getStringAttribute ("colour", "ff000000")));
|
||||
g.setFont (height * 0.7f);
|
||||
g.setFont ((float) height * 0.7f);
|
||||
|
||||
// draw the xml element's tag name..
|
||||
g.drawText (xml.getTagName(),
|
||||
|
|
@ -145,7 +145,7 @@ public:
|
|||
g.fillAll (Colours::blue.withAlpha (0.3f));
|
||||
|
||||
g.setColour (Colours::black);
|
||||
g.setFont (height * 0.7f);
|
||||
g.setFont ((float) height * 0.7f);
|
||||
|
||||
// draw the element's tag name..
|
||||
g.drawText (getText(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue