Browse Source

Minor tidying up.

tags/2021-05-28
jules 12 years ago
parent
commit
31fc78b314
5 changed files with 24 additions and 39 deletions
  1. +13
    -17
      extras/Introjucer/Source/Project/jucer_Module.cpp
  2. +3
    -9
      modules/juce_core/maths/juce_Range.h
  3. +1
    -2
      modules/juce_graphics/colour/juce_Colour.cpp
  4. +0
    -3
      modules/juce_graphics/geometry/juce_Point.h
  5. +7
    -8
      modules/juce_gui_basics/keyboard/juce_KeyPress.cpp

+ 13
- 17
extras/Introjucer/Source/Project/jucer_Module.cpp View File

@@ -223,21 +223,17 @@ Result ModuleList::rescan (const File& newModulesFolder)
{
LibraryModule m (moduleDef);
if (m.isValid())
{
Module* info = new Module();
modules.add (info);
info->uid = m.getID();
info->version = m.getVersion();
info->name = m.moduleInfo ["name"];
info->description = m.moduleInfo ["description"];
info->file = moduleDef;
}
else
{
if (! m.isValid())
return Result::fail ("Failed to load module manifest: " + moduleDef.getFullPathName());
}
Module* info = new Module();
modules.add (info);
info->uid = m.getID();
info->version = m.getVersion();
info->name = m.moduleInfo ["name"];
info->description = m.moduleInfo ["description"];
info->file = moduleDef;
}
}
}
@@ -756,10 +752,10 @@ static void addFileWithGroups (Project::Item& group, const RelativePath& file, c
void LibraryModule::findBrowseableFiles (const File& localModuleFolder, Array<File>& filesFound) const
{
const var filesArray (moduleInfo ["browse"]);
const Array<var>* const files = filesArray.getArray();
for (int i = 0; i < files->size(); ++i)
findWildcardMatches (localModuleFolder, files->getReference(i), filesFound);
if (const Array<var>* const files = filesArray.getArray())
for (int i = 0; i < files->size(); ++i)
findWildcardMatches (localModuleFolder, files->getReference(i), filesFound);
}
void LibraryModule::addBrowsableCode (ProjectExporter& exporter, const Array<File>& compiled, const File& localModuleFolder) const


+ 3
- 9
modules/juce_core/maths/juce_Range.h View File

@@ -40,8 +40,7 @@ class Range
public:
//==============================================================================
/** Constructs an empty range. */
Range() noexcept
: start (ValueType()), end (ValueType())
Range() noexcept : start(), end()
{
}
@@ -65,16 +64,11 @@ public:
return *this;
}
/** Destructor. */
~Range() noexcept
{
}
/** Returns the range that lies between two positions (in either order). */
static Range between (const ValueType position1, const ValueType position2) noexcept
{
return (position1 < position2) ? Range (position1, position2)
: Range (position2, position1);
return position1 < position2 ? Range (position1, position2)
: Range (position2, position1);
}
/** Returns a range with the specified start position and a length of zero. */


+ 1
- 2
modules/juce_graphics/colour/juce_Colour.cpp View File

@@ -169,8 +169,7 @@ bool Colour::operator== (const Colour& other) const noexcept { return argb.ge
bool Colour::operator!= (const Colour& other) const noexcept { return argb.getARGB() != other.argb.getARGB(); }
//==============================================================================
Colour::Colour (const uint32 argb_) noexcept
: argb (argb_)
Colour::Colour (const uint32 col) noexcept : argb (col)
{
}


+ 0
- 3
modules/juce_graphics/geometry/juce_Point.h View File

@@ -52,9 +52,6 @@ public:
/** Creates a point from an (x, y) position. */
Point (const ValueType initialX, const ValueType initialY) noexcept : x (initialX), y (initialY) {}
/** Destructor. */
~Point() noexcept {}
//==============================================================================
/** Copies this point from another one. */
Point& operator= (const Point& other) noexcept { x = other.x; y = other.y; return *this; }


+ 7
- 8
modules/juce_gui_basics/keyboard/juce_KeyPress.cpp View File

@@ -29,17 +29,16 @@ KeyPress::KeyPress() noexcept
{
}
KeyPress::KeyPress (const int keyCode_,
ModifierKeys mods_,
const juce_wchar textCharacter_) noexcept
: keyCode (keyCode_),
mods (mods_),
textCharacter (textCharacter_)
KeyPress::KeyPress (const int code, ModifierKeys m,
const juce_wchar textChar) noexcept
: keyCode (code),
mods (m),
textCharacter (textChar)
{
}
KeyPress::KeyPress (const int keyCode_) noexcept
: keyCode (keyCode_),
KeyPress::KeyPress (const int code) noexcept
: keyCode (code),
textCharacter (0)
{
}


Loading…
Cancel
Save