mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Build: Add -Wdeprecated to recommended flags and fix new warnings
This commit is contained in:
parent
fb1f94767d
commit
1d1d743b9f
23 changed files with 19 additions and 76 deletions
|
|
@ -11,7 +11,7 @@ elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQU
|
|||
-Wsign-conversion -Wbool-conversion -Wextra-semi -Wunreachable-code
|
||||
-Wcast-align -Wshift-sign-overflow -Wno-missing-field-initializers
|
||||
-Wnullable-to-nonnull-conversion -Wno-ignored-qualifiers -Wswitch-enum
|
||||
-Wpedantic
|
||||
-Wpedantic -Wdeprecated
|
||||
$<$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:OBJCXX>>:
|
||||
-Wzero-as-null-pointer-constant -Wunused-private-field
|
||||
-Woverloaded-virtual -Wreorder
|
||||
|
|
|
|||
|
|
@ -58,8 +58,6 @@ public:
|
|||
/** Constructor. */
|
||||
SmoothedValueBase() = default;
|
||||
|
||||
virtual ~SmoothedValueBase() {}
|
||||
|
||||
//==============================================================================
|
||||
/** Returns true if the current value is currently being interpolated. */
|
||||
bool isSmoothing() const noexcept { return countdown > 0; }
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@
|
|||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion",
|
||||
"-Wshadow-field",
|
||||
"-Wzero-as-null-pointer-constant",
|
||||
"-Wsign-conversion")
|
||||
"-Wsign-conversion",
|
||||
"-Wdeprecated")
|
||||
|
||||
#include <climits>
|
||||
#include <cfloat>
|
||||
|
|
|
|||
|
|
@ -32,10 +32,6 @@ Random::Random() : seed (1)
|
|||
setSeedRandomly();
|
||||
}
|
||||
|
||||
Random::~Random() noexcept
|
||||
{
|
||||
}
|
||||
|
||||
void Random::setSeed (const int64 newSeed) noexcept
|
||||
{
|
||||
if (this == &getSystemRandom())
|
||||
|
|
|
|||
|
|
@ -50,9 +50,6 @@ public:
|
|||
*/
|
||||
Random();
|
||||
|
||||
/** Destructor. */
|
||||
~Random() noexcept;
|
||||
|
||||
/** Returns the next random 32 bit integer.
|
||||
@returns a random integer from the full range 0x80000000 to 0x7fffffff
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@ RSAKey::RSAKey (const String& s)
|
|||
}
|
||||
}
|
||||
|
||||
RSAKey::~RSAKey()
|
||||
{
|
||||
}
|
||||
|
||||
bool RSAKey::operator== (const RSAKey& other) const noexcept
|
||||
{
|
||||
return part1 == other.part1 && part2 == other.part2;
|
||||
|
|
|
|||
|
|
@ -107,9 +107,6 @@ public:
|
|||
*/
|
||||
explicit RSAKey (const String& stringRepresentation);
|
||||
|
||||
/** Destructor. */
|
||||
~RSAKey();
|
||||
|
||||
bool operator== (const RSAKey& other) const noexcept;
|
||||
bool operator!= (const RSAKey& other) const noexcept;
|
||||
|
||||
|
|
|
|||
|
|
@ -204,6 +204,9 @@ public:
|
|||
throw std::runtime_error { "this was meant to happen" };
|
||||
}
|
||||
|
||||
BadConstructor (const BadConstructor&) = default;
|
||||
BadConstructor& operator= (const BadConstructor&) = delete;
|
||||
|
||||
~BadConstructor() noexcept { counts.destructions += 1; }
|
||||
|
||||
void operator()() const noexcept { counts.calls += 1; }
|
||||
|
|
|
|||
|
|
@ -33,9 +33,10 @@ namespace dsp
|
|||
template <typename Type>
|
||||
struct SIMDRegister<Type>::ElementAccess
|
||||
{
|
||||
operator Type() const { return simd.get (idx); }
|
||||
ElementAccess& operator= (Type scalar) noexcept { simd.set (idx, scalar); return *this; }
|
||||
ElementAccess& operator= (ElementAccess& o) noexcept { return operator= ((Type) o); }
|
||||
ElementAccess (const ElementAccess&) = default;
|
||||
operator Type() const { return simd.get (idx); }
|
||||
ElementAccess& operator= (Type scalar) noexcept { simd.set (idx, scalar); return *this; }
|
||||
ElementAccess& operator= (const ElementAccess& o) noexcept { return operator= ((Type) o); }
|
||||
|
||||
private:
|
||||
friend struct SIMDRegister;
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
LowLevelGraphicsContext::LowLevelGraphicsContext() {}
|
||||
LowLevelGraphicsContext::~LowLevelGraphicsContext() {}
|
||||
|
||||
//==============================================================================
|
||||
Graphics::Graphics (const Image& imageToDrawOnto)
|
||||
: contextHolder (imageToDrawOnto.createLowLevelContext()),
|
||||
|
|
@ -61,10 +57,6 @@ Graphics::Graphics (LowLevelGraphicsContext& internalContext) noexcept
|
|||
{
|
||||
}
|
||||
|
||||
Graphics::~Graphics()
|
||||
{
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void Graphics::resetToDefaultState()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,9 +56,6 @@ public:
|
|||
*/
|
||||
explicit Graphics (const Image& imageToDrawOnto);
|
||||
|
||||
/** Destructor. */
|
||||
~Graphics();
|
||||
|
||||
//==============================================================================
|
||||
/** Changes the current drawing colour.
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ class JUCE_API LowLevelGraphicsContext
|
|||
{
|
||||
protected:
|
||||
//==============================================================================
|
||||
LowLevelGraphicsContext();
|
||||
LowLevelGraphicsContext() = default;
|
||||
|
||||
public:
|
||||
virtual ~LowLevelGraphicsContext();
|
||||
virtual ~LowLevelGraphicsContext() = default;
|
||||
|
||||
/** Returns true if this device is vector-based, e.g. a printer. */
|
||||
virtual bool isVectorDevice() const = 0;
|
||||
|
|
|
|||
|
|
@ -83,10 +83,6 @@ LowLevelGraphicsPostScriptRenderer::LowLevelGraphicsPostScriptRenderer (OutputSt
|
|||
<< scale << ' ' << scale << " scale\n\n";
|
||||
}
|
||||
|
||||
LowLevelGraphicsPostScriptRenderer::~LowLevelGraphicsPostScriptRenderer()
|
||||
{
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
bool LowLevelGraphicsPostScriptRenderer::isVectorDevice() const
|
||||
{
|
||||
|
|
@ -168,10 +164,6 @@ LowLevelGraphicsPostScriptRenderer::SavedState::SavedState()
|
|||
{
|
||||
}
|
||||
|
||||
LowLevelGraphicsPostScriptRenderer::SavedState::~SavedState()
|
||||
{
|
||||
}
|
||||
|
||||
void LowLevelGraphicsPostScriptRenderer::saveState()
|
||||
{
|
||||
stateStack.add (new SavedState (*stateStack.getLast()));
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ public:
|
|||
int totalWidth,
|
||||
int totalHeight);
|
||||
|
||||
~LowLevelGraphicsPostScriptRenderer() override;
|
||||
|
||||
//==============================================================================
|
||||
bool isVectorDevice() const override;
|
||||
void setOrigin (Point<int>) override;
|
||||
|
|
@ -96,7 +94,6 @@ protected:
|
|||
{
|
||||
SavedState();
|
||||
SavedState& operator= (const SavedState&) = delete;
|
||||
~SavedState();
|
||||
|
||||
RectangleList<int> clip;
|
||||
int xOffset, yOffset;
|
||||
|
|
|
|||
|
|
@ -47,9 +47,6 @@ public:
|
|||
*/
|
||||
BorderSize() = default;
|
||||
|
||||
/** Creates a copy of another border. */
|
||||
BorderSize (const BorderSize&) = default;
|
||||
|
||||
/** Creates a border with the given gaps. */
|
||||
BorderSize (ValueType topGap, ValueType leftGap, ValueType bottomGap, ValueType rightGap) noexcept
|
||||
: top (topGap), left (leftGap), bottom (bottomGap), right (rightGap)
|
||||
|
|
|
|||
|
|
@ -738,9 +738,6 @@ private:
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
FlexBox::FlexBox() noexcept = default;
|
||||
FlexBox::~FlexBox() noexcept = default;
|
||||
|
||||
FlexBox::FlexBox (JustifyContent jc) noexcept : justifyContent (jc) {}
|
||||
|
||||
FlexBox::FlexBox (Direction d, Wrap w, AlignContent ac, AlignItems ai, JustifyContent jc) noexcept
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** Creates an empty FlexBox container with default parameters. */
|
||||
FlexBox() noexcept;
|
||||
FlexBox() noexcept = default;
|
||||
|
||||
/** Creates an empty FlexBox container with these parameters. */
|
||||
FlexBox (Direction, Wrap, AlignContent, AlignItems, JustifyContent) noexcept;
|
||||
|
|
@ -99,9 +99,6 @@ public:
|
|||
/** Creates an empty FlexBox container with the given content-justification mode. */
|
||||
FlexBox (JustifyContent) noexcept;
|
||||
|
||||
/** Destructor. */
|
||||
~FlexBox() noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Lays-out the box's items within the given rectangle. */
|
||||
void performLayout (Rectangle<float> targetArea);
|
||||
|
|
|
|||
|
|
@ -68,9 +68,7 @@ GridItem::Margin::Margin (float v) noexcept : left (v), right (v), top (v), bott
|
|||
GridItem::Margin::Margin (float t, float r, float b, float l) noexcept : left (l), right (r), top (t), bottom (b) {}
|
||||
|
||||
//==============================================================================
|
||||
GridItem::GridItem() noexcept {}
|
||||
GridItem::~GridItem() noexcept {}
|
||||
|
||||
GridItem::GridItem() noexcept = default;
|
||||
GridItem::GridItem (Component& componentToUse) noexcept : associatedComponent (&componentToUse) {}
|
||||
GridItem::GridItem (Component* componentToUse) noexcept : associatedComponent (componentToUse) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,9 +128,6 @@ public:
|
|||
/** Creates an item with a given Component to use. */
|
||||
GridItem (Component* componentToUse) noexcept;
|
||||
|
||||
/** Destructor. */
|
||||
~GridItem() noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** If this is non-null, it represents a Component whose bounds are controlled by this item. */
|
||||
Component* associatedComponent = nullptr;
|
||||
|
|
|
|||
|
|
@ -57,10 +57,6 @@ MouseEvent::MouseEvent (MouseInputSource inputSource,
|
|||
{
|
||||
}
|
||||
|
||||
MouseEvent::~MouseEvent() noexcept
|
||||
{
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
MouseEvent MouseEvent::getEventRelativeTo (Component* const otherComponent) const noexcept
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,8 +79,11 @@ public:
|
|||
int numberOfClicks,
|
||||
bool mouseWasDragged) noexcept;
|
||||
|
||||
/** Destructor. */
|
||||
~MouseEvent() noexcept;
|
||||
MouseEvent (const MouseEvent&) = default;
|
||||
MouseEvent& operator= (const MouseEvent&) = delete;
|
||||
|
||||
MouseEvent (MouseEvent&&) = default;
|
||||
MouseEvent& operator= (MouseEvent&&) = delete;
|
||||
|
||||
//==============================================================================
|
||||
/** The position of the mouse when the event occurred.
|
||||
|
|
@ -374,8 +377,6 @@ public:
|
|||
private:
|
||||
//==============================================================================
|
||||
const uint8 numberOfClicks, wasMovedSinceMouseDown;
|
||||
|
||||
MouseEvent& operator= (const MouseEvent&);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,10 +31,6 @@ RecentlyOpenedFilesList::RecentlyOpenedFilesList()
|
|||
{
|
||||
}
|
||||
|
||||
RecentlyOpenedFilesList::~RecentlyOpenedFilesList()
|
||||
{
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void RecentlyOpenedFilesList::setMaxNumberOfItems (const int newMaxNumber)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,9 +46,6 @@ public:
|
|||
*/
|
||||
RecentlyOpenedFilesList();
|
||||
|
||||
/** Destructor. */
|
||||
~RecentlyOpenedFilesList();
|
||||
|
||||
//==============================================================================
|
||||
/** Sets a limit for the number of files that will be stored in the list.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue