diff --git a/extras/Introjucer/Source/Project/jucer_Module.cpp b/extras/Introjucer/Source/Project/jucer_Module.cpp index d80b1fefbd..2ee10da013 100644 --- a/extras/Introjucer/Source/Project/jucer_Module.cpp +++ b/extras/Introjucer/Source/Project/jucer_Module.cpp @@ -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& filesFound) const { const var filesArray (moduleInfo ["browse"]); - const Array* const files = filesArray.getArray(); - for (int i = 0; i < files->size(); ++i) - findWildcardMatches (localModuleFolder, files->getReference(i), filesFound); + if (const Array* 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& compiled, const File& localModuleFolder) const diff --git a/modules/juce_core/maths/juce_Range.h b/modules/juce_core/maths/juce_Range.h index 1edad8b195..960fac62e8 100644 --- a/modules/juce_core/maths/juce_Range.h +++ b/modules/juce_core/maths/juce_Range.h @@ -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. */ diff --git a/modules/juce_graphics/colour/juce_Colour.cpp b/modules/juce_graphics/colour/juce_Colour.cpp index 794f39214b..3854061408 100644 --- a/modules/juce_graphics/colour/juce_Colour.cpp +++ b/modules/juce_graphics/colour/juce_Colour.cpp @@ -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) { } diff --git a/modules/juce_graphics/geometry/juce_Point.h b/modules/juce_graphics/geometry/juce_Point.h index d230135bcf..de007a7cd2 100644 --- a/modules/juce_graphics/geometry/juce_Point.h +++ b/modules/juce_graphics/geometry/juce_Point.h @@ -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; } diff --git a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp index a3441b9339..a16f7db918 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp +++ b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp @@ -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) { }