Browse Source

Worked around a GCC compiler bug. Also tidied up a bunch of GCC warnings.

tags/2021-05-28
jules 13 years ago
parent
commit
d0135d9efc
18 changed files with 79 additions and 76 deletions
  1. +7
    -7
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h
  2. +13
    -13
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h
  3. +4
    -4
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h
  4. +4
    -4
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h
  5. +9
    -7
      extras/Introjucer/Source/Project/jucer_ModulesPanel.h
  6. +6
    -6
      extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp
  7. +1
    -1
      extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.cpp
  8. +1
    -1
      modules/juce_core/streams/juce_MemoryOutputStream.cpp
  9. +2
    -2
      modules/juce_core/threads/juce_TimeSliceThread.cpp
  10. +1
    -1
      modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp
  11. +2
    -1
      modules/juce_data_structures/values/juce_ValueTree.cpp
  12. +2
    -1
      modules/juce_graphics/fonts/juce_Font.cpp
  13. +2
    -2
      modules/juce_graphics/native/juce_RenderingHelpers.h
  14. +1
    -1
      modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp
  15. +9
    -9
      modules/juce_gui_basics/drawables/juce_DrawablePath.cpp
  16. +11
    -11
      modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp
  17. +2
    -2
      modules/juce_gui_basics/menus/juce_PopupMenu.cpp
  18. +2
    -3
      modules/juce_gui_basics/native/juce_mac_MainMenu.mm

+ 7
- 7
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h View File

@@ -212,8 +212,8 @@ protected:
class AndroidBuildConfiguration : public BuildConfiguration class AndroidBuildConfiguration : public BuildConfiguration
{ {
public: public:
AndroidBuildConfiguration (Project& project, const ValueTree& settings)
: BuildConfiguration (project, settings)
AndroidBuildConfiguration (Project& p, const ValueTree& settings)
: BuildConfiguration (p, settings)
{ {
if (getArchitectures().isEmpty()) if (getArchitectures().isEmpty())
getArchitecturesValue() = "armeabi armeabi-v7a"; 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: private:
@@ -629,9 +629,9 @@ private:
void writeStringsFile (const File& file) const void writeStringsFile (const File& file) const
{ {
XmlElement strings ("resources"); 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); writeXmlOrThrow (strings, file, "utf-8", 100);
} }


+ 13
- 13
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h View File

@@ -131,8 +131,8 @@ protected:
class MSVCBuildConfiguration : public BuildConfiguration class MSVCBuildConfiguration : public BuildConfiguration
{ {
public: public:
MSVCBuildConfiguration (Project& project, const ValueTree& settings)
: BuildConfiguration (project, settings)
MSVCBuildConfiguration (Project& p, const ValueTree& settings)
: BuildConfiguration (p, settings)
{ {
if (getWarningLevel() == 0) if (getWarningLevel() == 0)
getWarningLevelValue() = 4; 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) static int getWarningLevel (const BuildConfiguration& config)
@@ -989,8 +989,8 @@ protected:
class VC2010BuildConfiguration : public MSVCBuildConfiguration class VC2010BuildConfiguration : public MSVCBuildConfiguration
{ {
public: public:
VC2010BuildConfiguration (Project& project, const ValueTree& settings)
: MSVCBuildConfiguration (project, settings)
VC2010BuildConfiguration (Project& p, const ValueTree& settings)
: MSVCBuildConfiguration (p, settings)
{ {
if (getArchitectureType().toString().isEmpty()) if (getArchitectureType().toString().isEmpty())
getArchitectureType() = get32BitArchName(); getArchitectureType() = get32BitArchName();
@@ -1018,9 +1018,9 @@ protected:
virtual void addPlatformToolsetToPropertyGroup (XmlElement&) const {} 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) 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: private:
void addPlatformToolsetToPropertyGroup (XmlElement& project) const
void addPlatformToolsetToPropertyGroup (XmlElement& p) const
{ {
forEachXmlChildElementWithTagName (project, e, "PropertyGroup")
forEachXmlChildElementWithTagName (p, e, "PropertyGroup")
{ {
XmlElement* platformToolset (new XmlElement ("PlatformToolset")); XmlElement* platformToolset (new XmlElement ("PlatformToolset"));
platformToolset->addTextElement (getPlatformToolset()); platformToolset->addTextElement (getPlatformToolset());


+ 4
- 4
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h View File

@@ -83,8 +83,8 @@ protected:
class MakeBuildConfiguration : public BuildConfiguration class MakeBuildConfiguration : public BuildConfiguration
{ {
public: public:
MakeBuildConfiguration (Project& project, const ValueTree& settings)
: BuildConfiguration (project, settings)
MakeBuildConfiguration (Project& p, const ValueTree& settings)
: BuildConfiguration (p, settings)
{ {
setValueIfVoid (getLibrarySearchPathValue(), "/usr/X11R6/lib/"); 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: private:


+ 4
- 4
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h View File

@@ -265,9 +265,9 @@ protected:
bool iOS; 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: private:
@@ -1202,12 +1202,12 @@ private:
misc.add (v); 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()) if (script.trim().isNotEmpty())
{ {
ValueTree& v = addBuildPhase ("PBXShellScriptBuildPhase", StringArray()); 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 ("shellPath", "/bin/sh", nullptr);
v.setProperty ("shellScript", script.replace ("\\", "\\\\") v.setProperty ("shellScript", script.replace ("\\", "\\\\")
.replace ("\"", "\\\"") .replace ("\"", "\\\"")


+ 9
- 7
extras/Introjucer/Source/Project/jucer_ModulesPanel.h View File

@@ -201,9 +201,9 @@ public:
flipRow (row); flipRow (row);
} }
void selectedRowsChanged (int lastRowSelected)
void selectedRowsChanged (int row)
{ {
owner->selectionChanged (list.modules [lastRowSelected]);
owner->selectionChanged (list.modules [row]);
} }
void flipRow (int row) void flipRow (int row)
@@ -269,13 +269,15 @@ public:
mappings.add (Project::configFlagEnabled); mappings.add (Project::configFlagEnabled);
mappings.add (Project::configFlagDisabled); 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); props.add (c);
} }
} }


+ 6
- 6
extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp View File

@@ -36,11 +36,11 @@
class FileTreeTab : public TreePanelBase class FileTreeTab : public TreePanelBase
{ {
public: public:
FileTreeTab (Project& project)
: TreePanelBase (&project, "fileTreeState")
FileTreeTab (Project& p)
: TreePanelBase (&p, "fileTreeState")
{ {
tree.setMultiSelectEnabled (true); tree.setMultiSelectEnabled (true);
setRoot (new GroupTreeViewItem (project.getMainGroup()));
setRoot (new GroupTreeViewItem (p.getMainGroup()));
} }
}; };
@@ -48,11 +48,11 @@ public:
class ConfigTreeTab : public TreePanelBase class ConfigTreeTab : public TreePanelBase
{ {
public: public:
ConfigTreeTab (Project& project)
: TreePanelBase (&project, "settingsTreeState")
ConfigTreeTab (Project& p)
: TreePanelBase (&p, "settingsTreeState")
{ {
tree.setMultiSelectEnabled (false); tree.setMultiSelectEnabled (false);
setRoot (createProjectConfigTreeViewRoot (project));
setRoot (createProjectConfigTreeViewRoot (p));
if (tree.getNumSelectedItems() == 0) if (tree.getNumSelectedItems() == 0)
tree.getRootItem()->setSelected (true, true); tree.getRootItem()->setSelected (true, true);


+ 1
- 1
extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.cpp View File

@@ -75,7 +75,7 @@ JucerTreeViewBase::~JucerTreeViewBase()
void JucerTreeViewBase::refreshSubItems() void JucerTreeViewBase::refreshSubItems()
{ {
WholeTreeOpennessRestorer openness (*this);
WholeTreeOpennessRestorer wtor (*this);
clearSubItems(); clearSubItems();
addSubItems(); addSubItems();
} }


+ 1
- 1
modules/juce_core/streams/juce_MemoryOutputStream.cpp View File

@@ -70,7 +70,7 @@ void MemoryOutputStream::reset() noexcept
void MemoryOutputStream::prepareToWrite (size_t numBytes) void MemoryOutputStream::prepareToWrite (size_t numBytes)
{ {
jassert (numBytes >= 0);
jassert ((ssize_t) numBytes >= 0);
size_t storageNeeded = position + numBytes; size_t storageNeeded = position + numBytes;
if (storageNeeded >= data.getSize()) if (storageNeeded >= data.getSize())


+ 2
- 2
modules/juce_core/threads/juce_TimeSliceThread.cpp View File

@@ -23,8 +23,8 @@
============================================================================== ==============================================================================
*/ */
TimeSliceThread::TimeSliceThread (const String& threadName)
: Thread (threadName),
TimeSliceThread::TimeSliceThread (const String& name)
: Thread (name),
clientBeingCalled (nullptr) clientBeingCalled (nullptr)
{ {
} }


+ 1
- 1
modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp View File

@@ -139,7 +139,7 @@ void GZIPCompressorOutputStream::flush()
bool GZIPCompressorOutputStream::write (const void* destBuffer, size_t howMany) 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); return helper->write (static_cast <const uint8*> (destBuffer), howMany, *destStream);
} }


+ 2
- 1
modules/juce_data_structures/values/juce_ValueTree.cpp View File

@@ -34,7 +34,8 @@ public:
} }
SharedObject (const SharedObject& other) 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) for (int i = 0; i < other.children.size(); ++i)
{ {


+ 2
- 1
modules/juce_graphics/fonts/juce_Font.cpp View File

@@ -216,7 +216,8 @@ public:
} }
SharedFontInternal (const SharedFontInternal& other) noexcept SharedFontInternal (const SharedFontInternal& other) noexcept
: typefaceName (other.typefaceName),
: ReferenceCountedObject (other),
typefaceName (other.typefaceName),
typefaceStyle (other.typefaceStyle), typefaceStyle (other.typefaceStyle),
height (other.height), height (other.height),
horizontalScale (other.horizontalScale), horizontalScale (other.horizontalScale),


+ 2
- 2
modules/juce_graphics/native/juce_RenderingHelpers.h View File

@@ -1578,7 +1578,7 @@ namespace ClipRegions
EdgeTableRegion (const Rectangle<float>& r) : edgeTable (r) {} EdgeTableRegion (const Rectangle<float>& r) : edgeTable (r) {}
EdgeTableRegion (const RectangleList& 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 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 clone() const { return new EdgeTableRegion (*this); }
Ptr applyClipTo (const Ptr& target) const { return target->clipToEdgeTable (edgeTable); } Ptr applyClipTo (const Ptr& target) const { return target->clipToEdgeTable (edgeTable); }
@@ -1774,7 +1774,7 @@ namespace ClipRegions
public: public:
RectangleListRegion (const Rectangle<int>& r) : clip (r) {} RectangleListRegion (const Rectangle<int>& r) : clip (r) {}
RectangleListRegion (const RectangleList& 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 clone() const { return new RectangleListRegion (*this); }
Ptr applyClipTo (const Ptr& target) const { return target->clipToRectangleList (clip); } Ptr applyClipTo (const Ptr& target) const { return target->clipToRectangleList (clip); }


+ 1
- 1
modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp View File

@@ -30,7 +30,7 @@ KeyPressMappingSet::KeyPressMappingSet (ApplicationCommandManager& cm)
} }
KeyPressMappingSet::KeyPressMappingSet (const KeyPressMappingSet& other) KeyPressMappingSet::KeyPressMappingSet (const KeyPressMappingSet& other)
: ChangeBroadcaster(),
: KeyListener(), ChangeBroadcaster(), FocusChangeListener(),
commandManager (other.commandManager) commandManager (other.commandManager)
{ {
Desktop::getInstance().addFocusChangeListener (this); Desktop::getInstance().addFocusChangeListener (this);


+ 9
- 9
modules/juce_gui_basics/drawables/juce_DrawablePath.cpp View File

@@ -406,10 +406,10 @@ namespace DrawablePathHelpers
float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Point<float>& targetPoint, Expression::Scope* scope) const float DrawablePath::ValueTreeWrapper::Element::findProportionAlongLine (const Point<float>& targetPoint, Expression::Scope* scope) const
{ {
using namespace DrawablePathHelpers; using namespace DrawablePathHelpers;
const Identifier type (state.getType());
const Identifier pointType (state.getType());
float bestProp = 0; float bestProp = 0;
if (type == cubicToElement)
if (pointType == cubicToElement)
{ {
RelativePoint rp1 (getStartPoint()), rp2 (getControlPoint (0)), rp3 (getControlPoint (1)), rp4 (getEndPoint()); 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()); RelativePoint rp1 (getStartPoint()), rp2 (getControlPoint (0)), rp3 (getEndPoint());
const Point<float> points[] = { rp1.resolve (scope), rp2.resolve (scope), rp3.resolve (scope) }; 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()); RelativePoint rp1 (getStartPoint()), rp2 (getEndPoint());
const Line<float> line (rp1.resolve (scope), rp2.resolve (scope)); 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 DrawablePath::ValueTreeWrapper::Element::insertPoint (const Point<float>& targetPoint, Expression::Scope* scope, UndoManager* undoManager)
{ {
ValueTree newTree; ValueTree newTree;
const Identifier type (state.getType());
const Identifier pointType (state.getType());
if (type == cubicToElement)
if (pointType == cubicToElement)
{ {
float bestProp = findProportionAlongLine (targetPoint, scope); 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); state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager);
} }
else if (type == quadraticToElement)
else if (pointType == quadraticToElement)
{ {
float bestProp = findProportionAlongLine (targetPoint, scope); 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); state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager);
} }
else if (type == lineToElement)
else if (pointType == lineToElement)
{ {
RelativePoint rp1 (getStartPoint()), rp2 (getEndPoint()); RelativePoint rp1 (getStartPoint()), rp2 (getEndPoint());
const Line<float> line (rp1.resolve (scope), rp2.resolve (scope)); 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); state.getParent().addChild (newTree, state.getParent().indexOf (state) + 1, undoManager);
} }
else if (type == closeSubPathElement)
else if (pointType == closeSubPathElement)
{ {
} }


+ 11
- 11
modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp View File

@@ -77,31 +77,31 @@ int TabBarButton::getBestTabLength (const int depth)
return getLookAndFeel().getTabButtonBestWidth (*this, 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(); 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); const int overlap = lf.getTabButtonOverlap (depth);
if (overlap > 0) if (overlap > 0)
{ {
if (owner.isVertical()) if (owner.isVertical())
text.reduce (0, overlap);
textArea.reduce (0, overlap);
else else
text.reduce (overlap, 0);
textArea.reduce (overlap, 0);
} }
if (extraComponent != nullptr) if (extraComponent != nullptr)
extraComp = lf.getTabButtonExtraComponentBounds (*this, text, *extraComponent);
extraComp = lf.getTabButtonExtraComponentBounds (*this, textArea, *extraComponent);
} }
Rectangle<int> TabBarButton::getTextArea() const 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 Rectangle<int> TabBarButton::getActiveArea() const
@@ -139,8 +139,8 @@ void TabBarButton::resized()
{ {
if (extraComponent != nullptr) if (extraComponent != nullptr)
{ {
Rectangle<int> extraComp, text;
calcAreas (extraComp, text);
Rectangle<int> extraComp, textArea;
calcAreas (extraComp, textArea);
if (! extraComp.isEmpty()) if (! extraComp.isEmpty())
extraComponent->setBounds (extraComp); extraComponent->setBounds (extraComp);


+ 2
- 2
modules/juce_gui_basics/menus/juce_PopupMenu.cpp View File

@@ -1602,9 +1602,9 @@ void PopupMenu::setLookAndFeel (LookAndFeel* const newLookAndFeel)
} }
//============================================================================== //==============================================================================
PopupMenu::CustomComponent::CustomComponent (const bool isTriggeredAutomatically)
PopupMenu::CustomComponent::CustomComponent (bool autoTrigger)
: isHighlighted (false), : isHighlighted (false),
triggeredAutomatically (isTriggeredAutomatically)
triggeredAutomatically (autoTrigger)
{ {
} }


+ 2
- 3
modules/juce_gui_basics/native/juce_mac_MainMenu.mm View File

@@ -324,9 +324,6 @@ private:
[recentItem release]; [recentItem release];
} }
NSMenuItem* recentItem;
private:
static NSMenuItem* findRecentFilesItem (NSArray* const items) static NSMenuItem* findRecentFilesItem (NSArray* const items)
{ {
for (id object in items) for (id object in items)
@@ -337,6 +334,8 @@ private:
return nil; return nil;
} }
NSMenuItem* recentItem;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RecentFilesMenuItem) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RecentFilesMenuItem)
}; };


Loading…
Cancel
Save