mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Worked around a GCC compiler bug. Also tidied up a bunch of GCC warnings.
This commit is contained in:
parent
63411d7a47
commit
d0135d9efc
18 changed files with 79 additions and 76 deletions
|
|
@ -212,8 +212,8 @@ protected:
|
|||
class AndroidBuildConfiguration : public BuildConfiguration
|
||||
{
|
||||
public:
|
||||
AndroidBuildConfiguration (Project& project, const ValueTree& settings)
|
||||
: BuildConfiguration (project, settings)
|
||||
AndroidBuildConfiguration (Project& p, const ValueTree& settings)
|
||||
: BuildConfiguration (p, settings)
|
||||
{
|
||||
if (getArchitectures().isEmpty())
|
||||
getArchitecturesValue() = "armeabi armeabi-v7a";
|
||||
|
|
@ -229,9 +229,9 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& settings) const
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& v) const
|
||||
{
|
||||
return new AndroidBuildConfiguration (project, settings);
|
||||
return new AndroidBuildConfiguration (project, v);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -629,9 +629,9 @@ private:
|
|||
void writeStringsFile (const File& file) const
|
||||
{
|
||||
XmlElement strings ("resources");
|
||||
XmlElement* name = strings.createNewChildElement ("string");
|
||||
name->setAttribute ("name", "app_name");
|
||||
name->addTextElement (projectName);
|
||||
XmlElement* resourceName = strings.createNewChildElement ("string");
|
||||
resourceName->setAttribute ("name", "app_name");
|
||||
resourceName->addTextElement (projectName);
|
||||
|
||||
writeXmlOrThrow (strings, file, "utf-8", 100);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,8 +131,8 @@ protected:
|
|||
class MSVCBuildConfiguration : public BuildConfiguration
|
||||
{
|
||||
public:
|
||||
MSVCBuildConfiguration (Project& project, const ValueTree& settings)
|
||||
: BuildConfiguration (project, settings)
|
||||
MSVCBuildConfiguration (Project& p, const ValueTree& settings)
|
||||
: BuildConfiguration (p, settings)
|
||||
{
|
||||
if (getWarningLevel() == 0)
|
||||
getWarningLevelValue() = 4;
|
||||
|
|
@ -212,9 +212,9 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& settings) const
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& v) const
|
||||
{
|
||||
return new MSVCBuildConfiguration (project, settings);
|
||||
return new MSVCBuildConfiguration (project, v);
|
||||
}
|
||||
|
||||
static int getWarningLevel (const BuildConfiguration& config)
|
||||
|
|
@ -989,8 +989,8 @@ protected:
|
|||
class VC2010BuildConfiguration : public MSVCBuildConfiguration
|
||||
{
|
||||
public:
|
||||
VC2010BuildConfiguration (Project& project, const ValueTree& settings)
|
||||
: MSVCBuildConfiguration (project, settings)
|
||||
VC2010BuildConfiguration (Project& p, const ValueTree& settings)
|
||||
: MSVCBuildConfiguration (p, settings)
|
||||
{
|
||||
if (getArchitectureType().toString().isEmpty())
|
||||
getArchitectureType() = get32BitArchName();
|
||||
|
|
@ -1018,9 +1018,9 @@ protected:
|
|||
|
||||
virtual void addPlatformToolsetToPropertyGroup (XmlElement&) const {}
|
||||
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& settings) const
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& v) const
|
||||
{
|
||||
return new VC2010BuildConfiguration (project, settings);
|
||||
return new VC2010BuildConfiguration (project, v);
|
||||
}
|
||||
|
||||
static bool is64Bit (const BuildConfiguration& config)
|
||||
|
|
@ -1138,9 +1138,9 @@ protected:
|
|||
}
|
||||
|
||||
{
|
||||
XmlElement* name = props->createNewChildElement ("TargetName");
|
||||
setConditionAttribute (*name, config);
|
||||
name->addTextElement (config.getOutputFilename (String::empty, true));
|
||||
XmlElement* targetName = props->createNewChildElement ("TargetName");
|
||||
setConditionAttribute (*targetName, config);
|
||||
targetName->addTextElement (config.getOutputFilename (String::empty, true));
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -1523,9 +1523,9 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
void addPlatformToolsetToPropertyGroup (XmlElement& project) const
|
||||
void addPlatformToolsetToPropertyGroup (XmlElement& p) const
|
||||
{
|
||||
forEachXmlChildElementWithTagName (project, e, "PropertyGroup")
|
||||
forEachXmlChildElementWithTagName (p, e, "PropertyGroup")
|
||||
{
|
||||
XmlElement* platformToolset (new XmlElement ("PlatformToolset"));
|
||||
platformToolset->addTextElement (getPlatformToolset());
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ protected:
|
|||
class MakeBuildConfiguration : public BuildConfiguration
|
||||
{
|
||||
public:
|
||||
MakeBuildConfiguration (Project& project, const ValueTree& settings)
|
||||
: BuildConfiguration (project, settings)
|
||||
MakeBuildConfiguration (Project& p, const ValueTree& settings)
|
||||
: BuildConfiguration (p, settings)
|
||||
{
|
||||
setValueIfVoid (getLibrarySearchPathValue(), "/usr/X11R6/lib/");
|
||||
}
|
||||
|
|
@ -94,9 +94,9 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& settings) const
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& tree) const
|
||||
{
|
||||
return new MakeBuildConfiguration (project, settings);
|
||||
return new MakeBuildConfiguration (project, tree);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -265,9 +265,9 @@ protected:
|
|||
bool iOS;
|
||||
};
|
||||
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& settings) const
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& v) const
|
||||
{
|
||||
return new XcodeBuildConfiguration (project, settings, iOS);
|
||||
return new XcodeBuildConfiguration (project, v, iOS);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -1202,12 +1202,12 @@ private:
|
|||
misc.add (v);
|
||||
}
|
||||
|
||||
void addShellScriptBuildPhase (const String& name, const String& script) const
|
||||
void addShellScriptBuildPhase (const String& phaseName, const String& script) const
|
||||
{
|
||||
if (script.trim().isNotEmpty())
|
||||
{
|
||||
ValueTree& v = addBuildPhase ("PBXShellScriptBuildPhase", StringArray());
|
||||
v.setProperty (Ids::name, name, nullptr);
|
||||
v.setProperty (Ids::name, phaseName, nullptr);
|
||||
v.setProperty ("shellPath", "/bin/sh", nullptr);
|
||||
v.setProperty ("shellScript", script.replace ("\\", "\\\\")
|
||||
.replace ("\"", "\\\"")
|
||||
|
|
|
|||
|
|
@ -201,9 +201,9 @@ public:
|
|||
flipRow (row);
|
||||
}
|
||||
|
||||
void selectedRowsChanged (int lastRowSelected)
|
||||
void selectedRowsChanged (int row)
|
||||
{
|
||||
owner->selectionChanged (list.modules [lastRowSelected]);
|
||||
owner->selectionChanged (list.modules [row]);
|
||||
}
|
||||
|
||||
void flipRow (int row)
|
||||
|
|
@ -269,13 +269,15 @@ public:
|
|||
mappings.add (Project::configFlagEnabled);
|
||||
mappings.add (Project::configFlagDisabled);
|
||||
|
||||
OwnedArray <Project::ConfigFlag> flags;
|
||||
module->getConfigFlags (project, flags);
|
||||
OwnedArray <Project::ConfigFlag> configFlags;
|
||||
module->getConfigFlags (project, configFlags);
|
||||
|
||||
for (int i = 0; i < flags.size(); ++i)
|
||||
for (int i = 0; i < configFlags.size(); ++i)
|
||||
{
|
||||
ChoicePropertyComponent* c = new ChoicePropertyComponent (flags[i]->value, flags[i]->symbol, possibleValues, mappings);
|
||||
c->setTooltip (flags[i]->description);
|
||||
ChoicePropertyComponent* c = new ChoicePropertyComponent (configFlags[i]->value,
|
||||
configFlags[i]->symbol,
|
||||
possibleValues, mappings);
|
||||
c->setTooltip (configFlags[i]->description);
|
||||
props.add (c);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@
|
|||
class FileTreeTab : public TreePanelBase
|
||||
{
|
||||
public:
|
||||
FileTreeTab (Project& project)
|
||||
: TreePanelBase (&project, "fileTreeState")
|
||||
FileTreeTab (Project& p)
|
||||
: TreePanelBase (&p, "fileTreeState")
|
||||
{
|
||||
tree.setMultiSelectEnabled (true);
|
||||
setRoot (new GroupTreeViewItem (project.getMainGroup()));
|
||||
setRoot (new GroupTreeViewItem (p.getMainGroup()));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -48,11 +48,11 @@ public:
|
|||
class ConfigTreeTab : public TreePanelBase
|
||||
{
|
||||
public:
|
||||
ConfigTreeTab (Project& project)
|
||||
: TreePanelBase (&project, "settingsTreeState")
|
||||
ConfigTreeTab (Project& p)
|
||||
: TreePanelBase (&p, "settingsTreeState")
|
||||
{
|
||||
tree.setMultiSelectEnabled (false);
|
||||
setRoot (createProjectConfigTreeViewRoot (project));
|
||||
setRoot (createProjectConfigTreeViewRoot (p));
|
||||
|
||||
if (tree.getNumSelectedItems() == 0)
|
||||
tree.getRootItem()->setSelected (true, true);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ JucerTreeViewBase::~JucerTreeViewBase()
|
|||
|
||||
void JucerTreeViewBase::refreshSubItems()
|
||||
{
|
||||
WholeTreeOpennessRestorer openness (*this);
|
||||
WholeTreeOpennessRestorer wtor (*this);
|
||||
clearSubItems();
|
||||
addSubItems();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ void MemoryOutputStream::reset() noexcept
|
|||
|
||||
void MemoryOutputStream::prepareToWrite (size_t numBytes)
|
||||
{
|
||||
jassert (numBytes >= 0);
|
||||
jassert ((ssize_t) numBytes >= 0);
|
||||
size_t storageNeeded = position + numBytes;
|
||||
|
||||
if (storageNeeded >= data.getSize())
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
==============================================================================
|
||||
*/
|
||||
|
||||
TimeSliceThread::TimeSliceThread (const String& threadName)
|
||||
: Thread (threadName),
|
||||
TimeSliceThread::TimeSliceThread (const String& name)
|
||||
: Thread (name),
|
||||
clientBeingCalled (nullptr)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ void GZIPCompressorOutputStream::flush()
|
|||
|
||||
bool GZIPCompressorOutputStream::write (const void* destBuffer, size_t howMany)
|
||||
{
|
||||
jassert (destBuffer != nullptr && howMany >= 0);
|
||||
jassert (destBuffer != nullptr && (ssize_t) howMany >= 0);
|
||||
|
||||
return helper->write (static_cast <const uint8*> (destBuffer), howMany, *destStream);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ public:
|
|||
}
|
||||
|
||||
SharedObject (const SharedObject& other)
|
||||
: type (other.type), properties (other.properties), parent (nullptr)
|
||||
: ReferenceCountedObject (other),
|
||||
type (other.type), properties (other.properties), parent (nullptr)
|
||||
{
|
||||
for (int i = 0; i < other.children.size(); ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -216,7 +216,8 @@ public:
|
|||
}
|
||||
|
||||
SharedFontInternal (const SharedFontInternal& other) noexcept
|
||||
: typefaceName (other.typefaceName),
|
||||
: ReferenceCountedObject (other),
|
||||
typefaceName (other.typefaceName),
|
||||
typefaceStyle (other.typefaceStyle),
|
||||
height (other.height),
|
||||
horizontalScale (other.horizontalScale),
|
||||
|
|
|
|||
|
|
@ -1578,7 +1578,7 @@ namespace ClipRegions
|
|||
EdgeTableRegion (const Rectangle<float>& r) : edgeTable (r) {}
|
||||
EdgeTableRegion (const RectangleList& r) : edgeTable (r) {}
|
||||
EdgeTableRegion (const Rectangle<int>& bounds, const Path& p, const AffineTransform& t) : edgeTable (bounds, p, t) {}
|
||||
EdgeTableRegion (const EdgeTableRegion& other) : edgeTable (other.edgeTable) {}
|
||||
EdgeTableRegion (const EdgeTableRegion& other) : Base (other), edgeTable (other.edgeTable) {}
|
||||
|
||||
Ptr clone() const { return new EdgeTableRegion (*this); }
|
||||
Ptr applyClipTo (const Ptr& target) const { return target->clipToEdgeTable (edgeTable); }
|
||||
|
|
@ -1774,7 +1774,7 @@ namespace ClipRegions
|
|||
public:
|
||||
RectangleListRegion (const Rectangle<int>& r) : clip (r) {}
|
||||
RectangleListRegion (const RectangleList& r) : clip (r) {}
|
||||
RectangleListRegion (const RectangleListRegion& other) : clip (other.clip) {}
|
||||
RectangleListRegion (const RectangleListRegion& other) : Base (other), clip (other.clip) {}
|
||||
|
||||
Ptr clone() const { return new RectangleListRegion (*this); }
|
||||
Ptr applyClipTo (const Ptr& target) const { return target->clipToRectangleList (clip); }
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ KeyPressMappingSet::KeyPressMappingSet (ApplicationCommandManager& cm)
|
|||
}
|
||||
|
||||
KeyPressMappingSet::KeyPressMappingSet (const KeyPressMappingSet& other)
|
||||
: ChangeBroadcaster(),
|
||||
: KeyListener(), ChangeBroadcaster(), FocusChangeListener(),
|
||||
commandManager (other.commandManager)
|
||||
{
|
||||
Desktop::getInstance().addFocusChangeListener (this);
|
||||
|
|
|
|||
|
|
@ -406,10 +406,10 @@ namespace DrawablePathHelpers
|
|||
float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Point<float>& targetPoint, Expression::Scope* scope) const
|
||||
{
|
||||
using namespace DrawablePathHelpers;
|
||||
const Identifier type (state.getType());
|
||||
const Identifier pointType (state.getType());
|
||||
float bestProp = 0;
|
||||
|
||||
if (type == cubicToElement)
|
||||
if (pointType == cubicToElement)
|
||||
{
|
||||
RelativePoint rp1 (getStartPoint()), rp2 (getControlPoint (0)), rp3 (getControlPoint (1)), rp4 (getEndPoint());
|
||||
|
||||
|
|
@ -430,7 +430,7 @@ float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Po
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (type == quadraticToElement)
|
||||
else if (pointType == quadraticToElement)
|
||||
{
|
||||
RelativePoint rp1 (getStartPoint()), rp2 (getControlPoint (0)), rp3 (getEndPoint());
|
||||
const Point<float> points[] = { rp1.resolve (scope), rp2.resolve (scope), rp3.resolve (scope) };
|
||||
|
|
@ -450,7 +450,7 @@ float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Po
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (type == lineToElement)
|
||||
else if (pointType == lineToElement)
|
||||
{
|
||||
RelativePoint rp1 (getStartPoint()), rp2 (getEndPoint());
|
||||
const Line<float> line (rp1.resolve (scope), rp2.resolve (scope));
|
||||
|
|
@ -463,9 +463,9 @@ float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Po
|
|||
ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point<float>& targetPoint, Expression::Scope* scope, UndoManager* undoManager)
|
||||
{
|
||||
ValueTree newTree;
|
||||
const Identifier type (state.getType());
|
||||
const Identifier pointType (state.getType());
|
||||
|
||||
if (type == cubicToElement)
|
||||
if (pointType == cubicToElement)
|
||||
{
|
||||
float bestProp = findProportionAlongLine (targetPoint, scope);
|
||||
|
||||
|
|
@ -493,7 +493,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point<floa
|
|||
|
||||
state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager);
|
||||
}
|
||||
else if (type == quadraticToElement)
|
||||
else if (pointType == quadraticToElement)
|
||||
{
|
||||
float bestProp = findProportionAlongLine (targetPoint, scope);
|
||||
|
||||
|
|
@ -515,7 +515,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point<floa
|
|||
|
||||
state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager);
|
||||
}
|
||||
else if (type == lineToElement)
|
||||
else if (pointType == lineToElement)
|
||||
{
|
||||
RelativePoint rp1 (getStartPoint()), rp2 (getEndPoint());
|
||||
const Line<float> line (rp1.resolve (scope), rp2.resolve (scope));
|
||||
|
|
@ -528,7 +528,7 @@ ValueTree DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point<floa
|
|||
|
||||
state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager);
|
||||
}
|
||||
else if (type == closeSubPathElement)
|
||||
else if (pointType == closeSubPathElement)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,31 +77,31 @@ int TabBarButton::getBestTabLength (const int depth)
|
|||
return getLookAndFeel().getTabButtonBestWidth (*this, depth);
|
||||
}
|
||||
|
||||
void TabBarButton::calcAreas (Rectangle<int>& extraComp, Rectangle<int>& text) const
|
||||
void TabBarButton::calcAreas (Rectangle<int>& extraComp, Rectangle<int>& textArea) const
|
||||
{
|
||||
LookAndFeel& lf = getLookAndFeel();
|
||||
text = getActiveArea();
|
||||
textArea = getActiveArea();
|
||||
|
||||
const int depth = owner.isVertical() ? text.getWidth() : text.getHeight();
|
||||
const int depth = owner.isVertical() ? textArea.getWidth() : textArea.getHeight();
|
||||
const int overlap = lf.getTabButtonOverlap (depth);
|
||||
|
||||
if (overlap > 0)
|
||||
{
|
||||
if (owner.isVertical())
|
||||
text.reduce (0, overlap);
|
||||
textArea.reduce (0, overlap);
|
||||
else
|
||||
text.reduce (overlap, 0);
|
||||
textArea.reduce (overlap, 0);
|
||||
}
|
||||
|
||||
if (extraComponent != nullptr)
|
||||
extraComp = lf.getTabButtonExtraComponentBounds (*this, text, *extraComponent);
|
||||
extraComp = lf.getTabButtonExtraComponentBounds (*this, textArea, *extraComponent);
|
||||
}
|
||||
|
||||
Rectangle<int> TabBarButton::getTextArea() const
|
||||
{
|
||||
Rectangle<int> extraComp, text;
|
||||
calcAreas (extraComp, text);
|
||||
return text;
|
||||
Rectangle<int> extraComp, textArea;
|
||||
calcAreas (extraComp, textArea);
|
||||
return textArea;
|
||||
}
|
||||
|
||||
Rectangle<int> TabBarButton::getActiveArea() const
|
||||
|
|
@ -139,8 +139,8 @@ void TabBarButton::resized()
|
|||
{
|
||||
if (extraComponent != nullptr)
|
||||
{
|
||||
Rectangle<int> extraComp, text;
|
||||
calcAreas (extraComp, text);
|
||||
Rectangle<int> extraComp, textArea;
|
||||
calcAreas (extraComp, textArea);
|
||||
|
||||
if (! extraComp.isEmpty())
|
||||
extraComponent->setBounds (extraComp);
|
||||
|
|
|
|||
|
|
@ -1602,9 +1602,9 @@ void PopupMenu::setLookAndFeel (LookAndFeel* const newLookAndFeel)
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
PopupMenu::CustomComponent::CustomComponent (const bool isTriggeredAutomatically)
|
||||
PopupMenu::CustomComponent::CustomComponent (bool autoTrigger)
|
||||
: isHighlighted (false),
|
||||
triggeredAutomatically (isTriggeredAutomatically)
|
||||
triggeredAutomatically (autoTrigger)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -324,9 +324,6 @@ private:
|
|||
[recentItem release];
|
||||
}
|
||||
|
||||
NSMenuItem* recentItem;
|
||||
|
||||
private:
|
||||
static NSMenuItem* findRecentFilesItem (NSArray* const items)
|
||||
{
|
||||
for (id object in items)
|
||||
|
|
@ -337,6 +334,8 @@ private:
|
|||
return nil;
|
||||
}
|
||||
|
||||
NSMenuItem* recentItem;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RecentFilesMenuItem)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue