From 970eda679e28a305cf97e4dcba7fc86e5646f29a Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 9 Oct 2017 12:38:06 +0100 Subject: [PATCH] Added 'final' keyword to a lot of classes from which you really shouldn't be inheriting! --- .../juce_core/files/juce_DirectoryIterator.h | 2 +- modules/juce_core/files/juce_File.h | 2 +- .../juce_core/javascript/juce_Javascript.h | 2 +- modules/juce_core/maths/juce_Random.h | 2 +- modules/juce_core/memory/juce_Atomic.h | 4 +- modules/juce_core/network/juce_IPAddress.h | 2 +- modules/juce_core/network/juce_MACAddress.h | 2 +- modules/juce_core/network/juce_NamedPipe.h | 2 +- modules/juce_core/network/juce_Socket.h | 4 +- modules/juce_core/system/juce_SystemStats.h | 2 +- .../juce_core/text/juce_CharPointer_ASCII.h | 2 +- .../juce_core/text/juce_CharPointer_UTF16.h | 2 +- .../juce_core/text/juce_CharPointer_UTF32.h | 2 +- .../juce_core/text/juce_CharPointer_UTF8.h | 2 +- modules/juce_core/text/juce_Identifier.h | 2 +- modules/juce_core/text/juce_String.h | 40 +++++++++---------- modules/juce_core/text/juce_StringRef.h | 2 +- .../juce_data_structures/values/juce_Value.h | 2 +- .../values/juce_ValueTree.h | 2 +- .../messages/juce_Initialisation.h | 2 +- .../messages/juce_MessageManager.h | 2 +- modules/juce_graphics/colour/juce_Colour.h | 2 +- .../colour/juce_ColourGradient.h | 2 +- modules/juce_graphics/colour/juce_FillType.h | 2 +- .../contexts/juce_GraphicsContext.h | 2 +- modules/juce_graphics/fonts/juce_Font.h | 2 +- .../fonts/juce_GlyphArrangement.h | 4 +- modules/juce_graphics/fonts/juce_TextLayout.h | 2 +- .../geometry/juce_AffineTransform.h | 2 +- modules/juce_graphics/geometry/juce_Path.h | 2 +- .../geometry/juce_PathIterator.h | 2 +- .../geometry/juce_RectangleList.h | 2 +- modules/juce_graphics/images/juce_Image.h | 4 +- modules/juce_gui_basics/layout/juce_FlexBox.h | 2 +- .../juce_gui_basics/layout/juce_FlexItem.h | 4 +- modules/juce_gui_basics/layout/juce_Grid.h | 8 ++-- .../juce_gui_basics/mouse/juce_MouseCursor.h | 2 +- .../juce_gui_basics/mouse/juce_MouseEvent.h | 6 +-- .../mouse/juce_MouseInputSource.h | 2 +- 39 files changed, 68 insertions(+), 68 deletions(-) diff --git a/modules/juce_core/files/juce_DirectoryIterator.h b/modules/juce_core/files/juce_DirectoryIterator.h index a9b576f249..ebe72ee132 100644 --- a/modules/juce_core/files/juce_DirectoryIterator.h +++ b/modules/juce_core/files/juce_DirectoryIterator.h @@ -36,7 +36,7 @@ namespace juce It also provides an estimate of its progress, using a (highly inaccurate!) algorithm. */ -class JUCE_API DirectoryIterator +class JUCE_API DirectoryIterator final { public: //============================================================================== diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index 36b58f3f35..5a194cd96b 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -35,7 +35,7 @@ namespace juce @see FileInputStream, FileOutputStream */ -class JUCE_API File +class JUCE_API File final { public: //============================================================================== diff --git a/modules/juce_core/javascript/juce_Javascript.h b/modules/juce_core/javascript/juce_Javascript.h index 1a95998a5b..5d45df800f 100644 --- a/modules/juce_core/javascript/juce_Javascript.h +++ b/modules/juce_core/javascript/juce_Javascript.h @@ -42,7 +42,7 @@ namespace juce script creates complex connections between objects, you run the risk of creating cyclic dependencies and hence leaking. */ -class JUCE_API JavascriptEngine +class JUCE_API JavascriptEngine final { public: /** Creates an instance of the engine. diff --git a/modules/juce_core/maths/juce_Random.h b/modules/juce_core/maths/juce_Random.h index f3d7d490cf..696a079e06 100644 --- a/modules/juce_core/maths/juce_Random.h +++ b/modules/juce_core/maths/juce_Random.h @@ -29,7 +29,7 @@ namespace juce You can create a Random object and use it to generate a sequence of random numbers. */ -class JUCE_API Random +class JUCE_API Random final { public: //============================================================================== diff --git a/modules/juce_core/memory/juce_Atomic.h b/modules/juce_core/memory/juce_Atomic.h index 585b135504..8ba1f25fa3 100644 --- a/modules/juce_core/memory/juce_Atomic.h +++ b/modules/juce_core/memory/juce_Atomic.h @@ -37,7 +37,7 @@ namespace juce A simple wrapper around std::atomic. */ template - struct Atomic + struct Atomic final { typedef typename AtomicHelpers::DiffTypeHelper::Type DiffType; @@ -154,7 +154,7 @@ namespace juce There are methods to perform most of the basic atomic operations. */ template - class Atomic : public AtomicBase + class Atomic : public AtomicBase final { public: /** Resulting type when subtracting the underlying Type. */ diff --git a/modules/juce_core/network/juce_IPAddress.h b/modules/juce_core/network/juce_IPAddress.h index ac29e0c41a..cfb7568afa 100644 --- a/modules/juce_core/network/juce_IPAddress.h +++ b/modules/juce_core/network/juce_IPAddress.h @@ -27,7 +27,7 @@ namespace juce /** Represents an IP address. */ -class JUCE_API IPAddress +class JUCE_API IPAddress final { public: //============================================================================== diff --git a/modules/juce_core/network/juce_MACAddress.h b/modules/juce_core/network/juce_MACAddress.h index 45a5a1a04a..29ccccb8d2 100644 --- a/modules/juce_core/network/juce_MACAddress.h +++ b/modules/juce_core/network/juce_MACAddress.h @@ -27,7 +27,7 @@ namespace juce /** Represents a MAC network card adapter address ID. */ -class JUCE_API MACAddress +class JUCE_API MACAddress final { public: //============================================================================== diff --git a/modules/juce_core/network/juce_NamedPipe.h b/modules/juce_core/network/juce_NamedPipe.h index 8ae0482086..3e61bdf7ae 100644 --- a/modules/juce_core/network/juce_NamedPipe.h +++ b/modules/juce_core/network/juce_NamedPipe.h @@ -31,7 +31,7 @@ namespace juce @see InterprocessConnection */ -class JUCE_API NamedPipe +class JUCE_API NamedPipe final { public: //============================================================================== diff --git a/modules/juce_core/network/juce_Socket.h b/modules/juce_core/network/juce_Socket.h index 6a6b7b5982..460aae17d6 100644 --- a/modules/juce_core/network/juce_Socket.h +++ b/modules/juce_core/network/juce_Socket.h @@ -32,7 +32,7 @@ namespace juce @see DatagramSocket, InterprocessConnection, InterprocessConnectionServer */ -class JUCE_API StreamingSocket +class JUCE_API StreamingSocket final { public: //============================================================================== @@ -194,7 +194,7 @@ private: @see StreamingSocket, InterprocessConnection, InterprocessConnectionServer */ -class JUCE_API DatagramSocket +class JUCE_API DatagramSocket final { public: //============================================================================== diff --git a/modules/juce_core/system/juce_SystemStats.h b/modules/juce_core/system/juce_SystemStats.h index 89d3854e33..2bd1d9be5a 100644 --- a/modules/juce_core/system/juce_SystemStats.h +++ b/modules/juce_core/system/juce_SystemStats.h @@ -27,7 +27,7 @@ namespace juce /** Contains methods for finding out about the current hardware and OS configuration. */ -class JUCE_API SystemStats +class JUCE_API SystemStats final { public: //============================================================================== diff --git a/modules/juce_core/text/juce_CharPointer_ASCII.h b/modules/juce_core/text/juce_CharPointer_ASCII.h index 2e6b2b808b..83ce529964 100644 --- a/modules/juce_core/text/juce_CharPointer_ASCII.h +++ b/modules/juce_core/text/juce_CharPointer_ASCII.h @@ -32,7 +32,7 @@ namespace juce @see CharPointer_UTF8, CharPointer_UTF16, CharPointer_UTF32 */ -class CharPointer_ASCII +class CharPointer_ASCII final { public: typedef char CharType; diff --git a/modules/juce_core/text/juce_CharPointer_UTF16.h b/modules/juce_core/text/juce_CharPointer_UTF16.h index 2176482de0..1f3caf510e 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF16.h +++ b/modules/juce_core/text/juce_CharPointer_UTF16.h @@ -29,7 +29,7 @@ namespace juce various methods to operate on the data. @see CharPointer_UTF8, CharPointer_UTF32 */ -class CharPointer_UTF16 +class CharPointer_UTF16 final { public: #if JUCE_NATIVE_WCHAR_IS_UTF16 diff --git a/modules/juce_core/text/juce_CharPointer_UTF32.h b/modules/juce_core/text/juce_CharPointer_UTF32.h index 41a9a7c251..1786d8842b 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF32.h +++ b/modules/juce_core/text/juce_CharPointer_UTF32.h @@ -29,7 +29,7 @@ namespace juce various methods to operate on the data. @see CharPointer_UTF8, CharPointer_UTF16 */ -class CharPointer_UTF32 +class CharPointer_UTF32 final { public: typedef juce_wchar CharType; diff --git a/modules/juce_core/text/juce_CharPointer_UTF8.h b/modules/juce_core/text/juce_CharPointer_UTF8.h index 7b5a91df90..071d1737a7 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF8.h +++ b/modules/juce_core/text/juce_CharPointer_UTF8.h @@ -29,7 +29,7 @@ namespace juce various methods to operate on the data. @see CharPointer_UTF16, CharPointer_UTF32 */ -class CharPointer_UTF8 +class CharPointer_UTF8 final { public: typedef char CharType; diff --git a/modules/juce_core/text/juce_Identifier.h b/modules/juce_core/text/juce_Identifier.h index 4c6d9bcd23..fc08a7be1f 100644 --- a/modules/juce_core/text/juce_Identifier.h +++ b/modules/juce_core/text/juce_Identifier.h @@ -33,7 +33,7 @@ namespace juce @see NamedValueSet, ValueTree */ -class JUCE_API Identifier +class JUCE_API Identifier final { public: /** Creates a null identifier. */ diff --git a/modules/juce_core/text/juce_String.h b/modules/juce_core/text/juce_String.h index 4ba4156d42..2cd0f6631e 100644 --- a/modules/juce_core/text/juce_String.h +++ b/modules/juce_core/text/juce_String.h @@ -33,7 +33,7 @@ namespace juce @see StringArray, StringPairArray */ -class JUCE_API String +class JUCE_API String final { public: //============================================================================== @@ -43,10 +43,10 @@ public: String() noexcept; /** Creates a copy of another string. */ - String (const String& other) noexcept; + String (const String&) noexcept; /** Move constructor */ - String (String&& other) noexcept; + String (String&&) noexcept; /** Creates a string from a zero-terminated ascii text string. @@ -93,37 +93,37 @@ public: //============================================================================== /** Creates a string from a UTF-8 character string */ - String (const CharPointer_UTF8 text); + String (CharPointer_UTF8 text); /** Creates a string from a UTF-8 character string */ - String (const CharPointer_UTF8 text, size_t maxChars); + String (CharPointer_UTF8 text, size_t maxChars); /** Creates a string from a UTF-8 character string */ - String (const CharPointer_UTF8 start, const CharPointer_UTF8 end); + String (CharPointer_UTF8 start, CharPointer_UTF8 end); //============================================================================== /** Creates a string from a UTF-16 character string */ - String (const CharPointer_UTF16 text); + String (CharPointer_UTF16 text); /** Creates a string from a UTF-16 character string */ - String (const CharPointer_UTF16 text, size_t maxChars); + String (CharPointer_UTF16 text, size_t maxChars); /** Creates a string from a UTF-16 character string */ - String (const CharPointer_UTF16 start, const CharPointer_UTF16 end); + String (CharPointer_UTF16 start, CharPointer_UTF16 end); //============================================================================== /** Creates a string from a UTF-32 character string */ - String (const CharPointer_UTF32 text); + String (CharPointer_UTF32 text); /** Creates a string from a UTF-32 character string */ - String (const CharPointer_UTF32 text, size_t maxChars); + String (CharPointer_UTF32 text, size_t maxChars); /** Creates a string from a UTF-32 character string */ - String (const CharPointer_UTF32 start, const CharPointer_UTF32 end); + String (CharPointer_UTF32 start, CharPointer_UTF32 end); //============================================================================== /** Creates a string from an ASCII character string */ - String (const CharPointer_ASCII text); + String (CharPointer_ASCII text); /** Creates a string from a UTF-8 encoded std::string. */ String (const std::string&); @@ -230,8 +230,8 @@ public: @param startOfTextToAppend the start of the string to add. This must not be a nullptr @param endOfTextToAppend the end of the string to add. This must not be a nullptr */ - void appendCharPointer (const CharPointerType startOfTextToAppend, - const CharPointerType endOfTextToAppend); + void appendCharPointer (CharPointerType startOfTextToAppend, + CharPointerType endOfTextToAppend); /** Appends a string to the end of this one. @@ -239,8 +239,8 @@ public: @param endOfTextToAppend the end of the string to add. This must not be a nullptr */ template - void appendCharPointer (const CharPointer startOfTextToAppend, - const CharPointer endOfTextToAppend) + void appendCharPointer (CharPointer startOfTextToAppend, + CharPointer endOfTextToAppend) { jassert (startOfTextToAppend.getAddress() != nullptr && endOfTextToAppend.getAddress() != nullptr); @@ -260,7 +260,7 @@ public: } /** Appends a string to the end of this one. */ - void appendCharPointer (const CharPointerType textToAppend); + void appendCharPointer (CharPointerType textToAppend); /** Appends a string to the end of this one. @@ -268,7 +268,7 @@ public: @param maxCharsToTake the maximum number of characters to take from the string passed in */ template - void appendCharPointer (const CharPointer textToAppend, size_t maxCharsToTake) + void appendCharPointer (CharPointer textToAppend, size_t maxCharsToTake) { if (textToAppend.getAddress() != nullptr) { @@ -290,7 +290,7 @@ public: /** Appends a string to the end of this one. */ template - void appendCharPointer (const CharPointer textToAppend) + void appendCharPointer (CharPointer textToAppend) { appendCharPointer (textToAppend, std::numeric_limits::max()); } diff --git a/modules/juce_core/text/juce_StringRef.h b/modules/juce_core/text/juce_StringRef.h index 86fbbfe832..2e21fec575 100644 --- a/modules/juce_core/text/juce_StringRef.h +++ b/modules/juce_core/text/juce_StringRef.h @@ -56,7 +56,7 @@ namespace juce @see String */ -class JUCE_API StringRef +class JUCE_API StringRef final { public: /** Creates a StringRef from a raw string literal. diff --git a/modules/juce_data_structures/values/juce_Value.h b/modules/juce_data_structures/values/juce_Value.h index e1216da45c..8386740fe4 100644 --- a/modules/juce_data_structures/values/juce_Value.h +++ b/modules/juce_data_structures/values/juce_Value.h @@ -46,7 +46,7 @@ namespace juce multiple threads, then you'll need to use your own synchronisation around any code that accesses it. */ -class JUCE_API Value +class JUCE_API Value final { public: //============================================================================== diff --git a/modules/juce_data_structures/values/juce_ValueTree.h b/modules/juce_data_structures/values/juce_ValueTree.h index d0a66f0cff..4f73aee75f 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.h +++ b/modules/juce_data_structures/values/juce_ValueTree.h @@ -67,7 +67,7 @@ namespace juce @see var, XmlElement */ -class JUCE_API ValueTree +class JUCE_API ValueTree final { public: //============================================================================== diff --git a/modules/juce_events/messages/juce_Initialisation.h b/modules/juce_events/messages/juce_Initialisation.h index db2988a709..2c20c44460 100644 --- a/modules/juce_events/messages/juce_Initialisation.h +++ b/modules/juce_events/messages/juce_Initialisation.h @@ -64,7 +64,7 @@ JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI(); Be careful with your threading though - to be safe, you should always make sure that these objects are created and deleted on the message thread. */ -class JUCE_API ScopedJuceInitialiser_GUI +class JUCE_API ScopedJuceInitialiser_GUI final { public: /** The constructor simply calls initialiseJuce_GUI(). */ diff --git a/modules/juce_events/messages/juce_MessageManager.h b/modules/juce_events/messages/juce_MessageManager.h index e4cb3fc4fd..3032e9b973 100644 --- a/modules/juce_events/messages/juce_MessageManager.h +++ b/modules/juce_events/messages/juce_MessageManager.h @@ -44,7 +44,7 @@ typedef void* (MessageCallbackFunction) (void* userData); @see Message, CallbackMessage, MessageManagerLock, JUCEApplication, JUCEApplicationBase */ -class JUCE_API MessageManager +class JUCE_API MessageManager final { public: //============================================================================== diff --git a/modules/juce_graphics/colour/juce_Colour.h b/modules/juce_graphics/colour/juce_Colour.h index c5b0c6ec3a..bc05b025a6 100644 --- a/modules/juce_graphics/colour/juce_Colour.h +++ b/modules/juce_graphics/colour/juce_Colour.h @@ -33,7 +33,7 @@ namespace juce The colour is stored internally as unsigned 8-bit red, green, blue and alpha values. */ -class JUCE_API Colour +class JUCE_API Colour final { public: //============================================================================== diff --git a/modules/juce_graphics/colour/juce_ColourGradient.h b/modules/juce_graphics/colour/juce_ColourGradient.h index 8f5ff7b22b..6d45ddb034 100644 --- a/modules/juce_graphics/colour/juce_ColourGradient.h +++ b/modules/juce_graphics/colour/juce_ColourGradient.h @@ -33,7 +33,7 @@ namespace juce @see Graphics::setGradientFill */ -class JUCE_API ColourGradient +class JUCE_API ColourGradient final { public: //============================================================================== diff --git a/modules/juce_graphics/colour/juce_FillType.h b/modules/juce_graphics/colour/juce_FillType.h index be3e518a67..05254b78a2 100644 --- a/modules/juce_graphics/colour/juce_FillType.h +++ b/modules/juce_graphics/colour/juce_FillType.h @@ -36,7 +36,7 @@ namespace juce @see Graphics::setFillType, DrawablePath::setFill */ -class JUCE_API FillType +class JUCE_API FillType final { public: //============================================================================== diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.h b/modules/juce_graphics/contexts/juce_GraphicsContext.h index 8351003c0d..41bbd69b60 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.h +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.h @@ -40,7 +40,7 @@ namespace juce @see Component::paint */ -class JUCE_API Graphics +class JUCE_API Graphics final { public: //============================================================================== diff --git a/modules/juce_graphics/fonts/juce_Font.h b/modules/juce_graphics/fonts/juce_Font.h index 54440a349e..d869a237cf 100644 --- a/modules/juce_graphics/fonts/juce_Font.h +++ b/modules/juce_graphics/fonts/juce_Font.h @@ -37,7 +37,7 @@ namespace juce @see Typeface */ -class JUCE_API Font +class JUCE_API Font final { public: //============================================================================== diff --git a/modules/juce_graphics/fonts/juce_GlyphArrangement.h b/modules/juce_graphics/fonts/juce_GlyphArrangement.h index 711e6a06fd..5bb306b1b4 100644 --- a/modules/juce_graphics/fonts/juce_GlyphArrangement.h +++ b/modules/juce_graphics/fonts/juce_GlyphArrangement.h @@ -37,7 +37,7 @@ namespace juce @see GlyphArrangement, Font */ -class JUCE_API PositionedGlyph +class JUCE_API PositionedGlyph final { public: //============================================================================== @@ -120,7 +120,7 @@ private: @see Font, PositionedGlyph */ -class JUCE_API GlyphArrangement +class JUCE_API GlyphArrangement final { public: //============================================================================== diff --git a/modules/juce_graphics/fonts/juce_TextLayout.h b/modules/juce_graphics/fonts/juce_TextLayout.h index d5b2016276..ae0254c543 100644 --- a/modules/juce_graphics/fonts/juce_TextLayout.h +++ b/modules/juce_graphics/fonts/juce_TextLayout.h @@ -36,7 +36,7 @@ namespace juce @see AttributedString */ -class JUCE_API TextLayout +class JUCE_API TextLayout final { public: /** Creates an empty layout. diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.h b/modules/juce_graphics/geometry/juce_AffineTransform.h index a11561bafd..40811b0a20 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.h +++ b/modules/juce_graphics/geometry/juce_AffineTransform.h @@ -38,7 +38,7 @@ namespace juce @see Path, Point, Line */ -class JUCE_API AffineTransform +class JUCE_API AffineTransform final { public: //============================================================================== diff --git a/modules/juce_graphics/geometry/juce_Path.h b/modules/juce_graphics/geometry/juce_Path.h index 1a4962ac6d..c868b1ddde 100644 --- a/modules/juce_graphics/geometry/juce_Path.h +++ b/modules/juce_graphics/geometry/juce_Path.h @@ -60,7 +60,7 @@ namespace juce @see PathFlatteningIterator, PathStrokeType, Graphics */ -class JUCE_API Path +class JUCE_API Path final { public: //============================================================================== diff --git a/modules/juce_graphics/geometry/juce_PathIterator.h b/modules/juce_graphics/geometry/juce_PathIterator.h index d37b5407d6..70917c13f3 100644 --- a/modules/juce_graphics/geometry/juce_PathIterator.h +++ b/modules/juce_graphics/geometry/juce_PathIterator.h @@ -37,7 +37,7 @@ namespace juce @see Path */ -class JUCE_API PathFlatteningIterator +class JUCE_API PathFlatteningIterator final { public: //============================================================================== diff --git a/modules/juce_graphics/geometry/juce_RectangleList.h b/modules/juce_graphics/geometry/juce_RectangleList.h index 55512fda1d..21ae5195f8 100644 --- a/modules/juce_graphics/geometry/juce_RectangleList.h +++ b/modules/juce_graphics/geometry/juce_RectangleList.h @@ -38,7 +38,7 @@ namespace juce @see Rectangle */ template -class RectangleList +class RectangleList final { public: typedef Rectangle RectangleType; diff --git a/modules/juce_graphics/images/juce_Image.h b/modules/juce_graphics/images/juce_Image.h index eefaa98d1f..7f65032e24 100644 --- a/modules/juce_graphics/images/juce_Image.h +++ b/modules/juce_graphics/images/juce_Image.h @@ -53,7 +53,7 @@ class ImagePixelData; @see Graphics, ImageFileFormat, ImageCache, ImageConvolutionKernel */ -class JUCE_API Image +class JUCE_API Image final { public: //============================================================================== @@ -313,7 +313,7 @@ public: The actual format of the pixel data depends on the image's format - see Image::getFormat(), and the PixelRGB, PixelARGB and PixelAlpha classes for more info. */ - class JUCE_API BitmapData + class JUCE_API BitmapData final { public: enum ReadWriteMode diff --git a/modules/juce_gui_basics/layout/juce_FlexBox.h b/modules/juce_gui_basics/layout/juce_FlexBox.h index b2c3e0929d..23c6a91a27 100644 --- a/modules/juce_gui_basics/layout/juce_FlexBox.h +++ b/modules/juce_gui_basics/layout/juce_FlexBox.h @@ -37,7 +37,7 @@ namespace juce @see FlexItem */ -class JUCE_API FlexBox +class JUCE_API FlexBox final { public: /** Possible values for the flexDirection property. */ diff --git a/modules/juce_gui_basics/layout/juce_FlexItem.h b/modules/juce_gui_basics/layout/juce_FlexItem.h index b52c3b6f48..71c3d20d20 100644 --- a/modules/juce_gui_basics/layout/juce_FlexItem.h +++ b/modules/juce_gui_basics/layout/juce_FlexItem.h @@ -32,7 +32,7 @@ namespace juce @see FlexBox */ -class JUCE_API FlexItem +class JUCE_API FlexItem final { public: //============================================================================== @@ -111,7 +111,7 @@ public: float maxHeight = (float) notAssigned; /**< The item's maximum height */ /** Represents a margin. */ - struct Margin + struct Margin final { Margin() noexcept; /**< Creates a margin of size zero. */ Margin (float size) noexcept; /**< Creates a margin with this size on all sides. */ diff --git a/modules/juce_gui_basics/layout/juce_Grid.h b/modules/juce_gui_basics/layout/juce_Grid.h index bf8d8fd7d4..6e11c99a04 100644 --- a/modules/juce_gui_basics/layout/juce_Grid.h +++ b/modules/juce_gui_basics/layout/juce_Grid.h @@ -35,12 +35,12 @@ namespace juce @see GridItem */ -class JUCE_API Grid +class JUCE_API Grid final { public: //============================================================================== /** A size in pixels */ - struct Px + struct Px final { explicit Px (float p) : pixels (static_cast(p)) { /*sta (p >= 0.0f);*/ } explicit Px (int p) : pixels (static_cast(p)) { /*sta (p >= 0.0f);*/ } @@ -51,7 +51,7 @@ public: }; /** A fractional ratio integer */ - struct Fr + struct Fr final { explicit Fr (int f) : fraction (static_cast (f)) {} explicit constexpr Fr (unsigned long long p) : fraction (p) {} @@ -61,7 +61,7 @@ public: //============================================================================== /** */ - struct TrackInfo + struct TrackInfo final { /** Creates a track with auto dimension. */ TrackInfo() noexcept; diff --git a/modules/juce_gui_basics/mouse/juce_MouseCursor.h b/modules/juce_gui_basics/mouse/juce_MouseCursor.h index 4ad39b1de6..54dc85bb14 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseCursor.h +++ b/modules/juce_gui_basics/mouse/juce_MouseCursor.h @@ -34,7 +34,7 @@ namespace juce This object can either be used to represent one of the standard mouse cursor shapes, or a custom one generated from an image. */ -class JUCE_API MouseCursor +class JUCE_API MouseCursor final { public: //============================================================================== diff --git a/modules/juce_gui_basics/mouse/juce_MouseEvent.h b/modules/juce_gui_basics/mouse/juce_MouseEvent.h index 4643cc368a..659acdda91 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseEvent.h +++ b/modules/juce_gui_basics/mouse/juce_MouseEvent.h @@ -34,7 +34,7 @@ namespace juce @see MouseListener, Component::mouseMove, Component::mouseEnter, Component::mouseExit, Component::mouseDown, Component::mouseUp, Component::mouseDrag */ -class JUCE_API MouseEvent +class JUCE_API MouseEvent final { public: //============================================================================== @@ -378,7 +378,7 @@ private: @see MouseListener, MouseEvent */ -struct MouseWheelDetails +struct MouseWheelDetails final { //============================================================================== /** The amount that the wheel has been moved in the X axis. @@ -418,7 +418,7 @@ struct MouseWheelDetails @see MouseListener, MouseEvent */ -struct PenDetails +struct PenDetails final { /** The rotation of the pen device in radians. Indicates the clockwise rotation, or twist, diff --git a/modules/juce_gui_basics/mouse/juce_MouseInputSource.h b/modules/juce_gui_basics/mouse/juce_MouseInputSource.h index b7e62e511c..ad081d8b1d 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseInputSource.h +++ b/modules/juce_gui_basics/mouse/juce_MouseInputSource.h @@ -47,7 +47,7 @@ namespace juce @see MouseEvent */ -class JUCE_API MouseInputSource +class JUCE_API MouseInputSource final { public: /** Possible mouse input sources. */