Browse Source

Added 'final' keyword to a lot of classes from which you really shouldn't be inheriting!

tags/2021-05-28
jules 7 years ago
parent
commit
970eda679e
39 changed files with 68 additions and 68 deletions
  1. +1
    -1
      modules/juce_core/files/juce_DirectoryIterator.h
  2. +1
    -1
      modules/juce_core/files/juce_File.h
  3. +1
    -1
      modules/juce_core/javascript/juce_Javascript.h
  4. +1
    -1
      modules/juce_core/maths/juce_Random.h
  5. +2
    -2
      modules/juce_core/memory/juce_Atomic.h
  6. +1
    -1
      modules/juce_core/network/juce_IPAddress.h
  7. +1
    -1
      modules/juce_core/network/juce_MACAddress.h
  8. +1
    -1
      modules/juce_core/network/juce_NamedPipe.h
  9. +2
    -2
      modules/juce_core/network/juce_Socket.h
  10. +1
    -1
      modules/juce_core/system/juce_SystemStats.h
  11. +1
    -1
      modules/juce_core/text/juce_CharPointer_ASCII.h
  12. +1
    -1
      modules/juce_core/text/juce_CharPointer_UTF16.h
  13. +1
    -1
      modules/juce_core/text/juce_CharPointer_UTF32.h
  14. +1
    -1
      modules/juce_core/text/juce_CharPointer_UTF8.h
  15. +1
    -1
      modules/juce_core/text/juce_Identifier.h
  16. +20
    -20
      modules/juce_core/text/juce_String.h
  17. +1
    -1
      modules/juce_core/text/juce_StringRef.h
  18. +1
    -1
      modules/juce_data_structures/values/juce_Value.h
  19. +1
    -1
      modules/juce_data_structures/values/juce_ValueTree.h
  20. +1
    -1
      modules/juce_events/messages/juce_Initialisation.h
  21. +1
    -1
      modules/juce_events/messages/juce_MessageManager.h
  22. +1
    -1
      modules/juce_graphics/colour/juce_Colour.h
  23. +1
    -1
      modules/juce_graphics/colour/juce_ColourGradient.h
  24. +1
    -1
      modules/juce_graphics/colour/juce_FillType.h
  25. +1
    -1
      modules/juce_graphics/contexts/juce_GraphicsContext.h
  26. +1
    -1
      modules/juce_graphics/fonts/juce_Font.h
  27. +2
    -2
      modules/juce_graphics/fonts/juce_GlyphArrangement.h
  28. +1
    -1
      modules/juce_graphics/fonts/juce_TextLayout.h
  29. +1
    -1
      modules/juce_graphics/geometry/juce_AffineTransform.h
  30. +1
    -1
      modules/juce_graphics/geometry/juce_Path.h
  31. +1
    -1
      modules/juce_graphics/geometry/juce_PathIterator.h
  32. +1
    -1
      modules/juce_graphics/geometry/juce_RectangleList.h
  33. +2
    -2
      modules/juce_graphics/images/juce_Image.h
  34. +1
    -1
      modules/juce_gui_basics/layout/juce_FlexBox.h
  35. +2
    -2
      modules/juce_gui_basics/layout/juce_FlexItem.h
  36. +4
    -4
      modules/juce_gui_basics/layout/juce_Grid.h
  37. +1
    -1
      modules/juce_gui_basics/mouse/juce_MouseCursor.h
  38. +3
    -3
      modules/juce_gui_basics/mouse/juce_MouseEvent.h
  39. +1
    -1
      modules/juce_gui_basics/mouse/juce_MouseInputSource.h

+ 1
- 1
modules/juce_core/files/juce_DirectoryIterator.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_core/files/juce_File.h View File

@@ -35,7 +35,7 @@ namespace juce
@see FileInputStream, FileOutputStream
*/
class JUCE_API File
class JUCE_API File final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_core/javascript/juce_Javascript.h View File

@@ -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.


+ 1
- 1
modules/juce_core/maths/juce_Random.h View File

@@ -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:
//==============================================================================


+ 2
- 2
modules/juce_core/memory/juce_Atomic.h View File

@@ -37,7 +37,7 @@ namespace juce
A simple wrapper around std::atomic.
*/
template <typename Type>
struct Atomic
struct Atomic final
{
typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType;
@@ -154,7 +154,7 @@ namespace juce
There are methods to perform most of the basic atomic operations.
*/
template <typename Type>
class Atomic : public AtomicBase<Type>
class Atomic : public AtomicBase<Type> final
{
public:
/** Resulting type when subtracting the underlying Type. */


+ 1
- 1
modules/juce_core/network/juce_IPAddress.h View File

@@ -27,7 +27,7 @@ namespace juce
/**
Represents an IP address.
*/
class JUCE_API IPAddress
class JUCE_API IPAddress final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_core/network/juce_MACAddress.h View File

@@ -27,7 +27,7 @@ namespace juce
/**
Represents a MAC network card adapter address ID.
*/
class JUCE_API MACAddress
class JUCE_API MACAddress final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_core/network/juce_NamedPipe.h View File

@@ -31,7 +31,7 @@ namespace juce
@see InterprocessConnection
*/
class JUCE_API NamedPipe
class JUCE_API NamedPipe final
{
public:
//==============================================================================


+ 2
- 2
modules/juce_core/network/juce_Socket.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_core/system/juce_SystemStats.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_core/text/juce_CharPointer_ASCII.h View File

@@ -32,7 +32,7 @@ namespace juce
@see CharPointer_UTF8, CharPointer_UTF16, CharPointer_UTF32
*/
class CharPointer_ASCII
class CharPointer_ASCII final
{
public:
typedef char CharType;


+ 1
- 1
modules/juce_core/text/juce_CharPointer_UTF16.h View File

@@ -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


+ 1
- 1
modules/juce_core/text/juce_CharPointer_UTF32.h View File

@@ -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;


+ 1
- 1
modules/juce_core/text/juce_CharPointer_UTF8.h View File

@@ -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;


+ 1
- 1
modules/juce_core/text/juce_Identifier.h View File

@@ -33,7 +33,7 @@ namespace juce
@see NamedValueSet, ValueTree
*/
class JUCE_API Identifier
class JUCE_API Identifier final
{
public:
/** Creates a null identifier. */


+ 20
- 20
modules/juce_core/text/juce_String.h View File

@@ -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 <class CharPointer>
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 <class CharPointer>
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 <class CharPointer>
void appendCharPointer (const CharPointer textToAppend)
void appendCharPointer (CharPointer textToAppend)
{
appendCharPointer (textToAppend, std::numeric_limits<size_t>::max());
}


+ 1
- 1
modules/juce_core/text/juce_StringRef.h View File

@@ -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.


+ 1
- 1
modules/juce_data_structures/values/juce_Value.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_data_structures/values/juce_ValueTree.h View File

@@ -67,7 +67,7 @@ namespace juce
@see var, XmlElement
*/
class JUCE_API ValueTree
class JUCE_API ValueTree final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_events/messages/juce_Initialisation.h View File

@@ -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(). */


+ 1
- 1
modules/juce_events/messages/juce_MessageManager.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_graphics/colour/juce_Colour.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_graphics/colour/juce_ColourGradient.h View File

@@ -33,7 +33,7 @@ namespace juce
@see Graphics::setGradientFill
*/
class JUCE_API ColourGradient
class JUCE_API ColourGradient final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_graphics/colour/juce_FillType.h View File

@@ -36,7 +36,7 @@ namespace juce
@see Graphics::setFillType, DrawablePath::setFill
*/
class JUCE_API FillType
class JUCE_API FillType final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_graphics/contexts/juce_GraphicsContext.h View File

@@ -40,7 +40,7 @@ namespace juce
@see Component::paint
*/
class JUCE_API Graphics
class JUCE_API Graphics final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_graphics/fonts/juce_Font.h View File

@@ -37,7 +37,7 @@ namespace juce
@see Typeface
*/
class JUCE_API Font
class JUCE_API Font final
{
public:
//==============================================================================


+ 2
- 2
modules/juce_graphics/fonts/juce_GlyphArrangement.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_graphics/fonts/juce_TextLayout.h View File

@@ -36,7 +36,7 @@ namespace juce
@see AttributedString
*/
class JUCE_API TextLayout
class JUCE_API TextLayout final
{
public:
/** Creates an empty layout.


+ 1
- 1
modules/juce_graphics/geometry/juce_AffineTransform.h View File

@@ -38,7 +38,7 @@ namespace juce
@see Path, Point, Line
*/
class JUCE_API AffineTransform
class JUCE_API AffineTransform final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_graphics/geometry/juce_Path.h View File

@@ -60,7 +60,7 @@ namespace juce
@see PathFlatteningIterator, PathStrokeType, Graphics
*/
class JUCE_API Path
class JUCE_API Path final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_graphics/geometry/juce_PathIterator.h View File

@@ -37,7 +37,7 @@ namespace juce
@see Path
*/
class JUCE_API PathFlatteningIterator
class JUCE_API PathFlatteningIterator final
{
public:
//==============================================================================


+ 1
- 1
modules/juce_graphics/geometry/juce_RectangleList.h View File

@@ -38,7 +38,7 @@ namespace juce
@see Rectangle
*/
template <typename ValueType>
class RectangleList
class RectangleList final
{
public:
typedef Rectangle<ValueType> RectangleType;


+ 2
- 2
modules/juce_graphics/images/juce_Image.h View File

@@ -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


+ 1
- 1
modules/juce_gui_basics/layout/juce_FlexBox.h View File

@@ -37,7 +37,7 @@ namespace juce
@see FlexItem
*/
class JUCE_API FlexBox
class JUCE_API FlexBox final
{
public:
/** Possible values for the flexDirection property. */


+ 2
- 2
modules/juce_gui_basics/layout/juce_FlexItem.h View File

@@ -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. */


+ 4
- 4
modules/juce_gui_basics/layout/juce_Grid.h View File

@@ -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<long double>(p)) { /*sta (p >= 0.0f);*/ }
explicit Px (int p) : pixels (static_cast<long double>(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<unsigned long long> (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;


+ 1
- 1
modules/juce_gui_basics/mouse/juce_MouseCursor.h View File

@@ -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:
//==============================================================================


+ 3
- 3
modules/juce_gui_basics/mouse/juce_MouseEvent.h View File

@@ -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,


+ 1
- 1
modules/juce_gui_basics/mouse/juce_MouseInputSource.h View File

@@ -47,7 +47,7 @@ namespace juce
@see MouseEvent
*/
class JUCE_API MouseInputSource
class JUCE_API MouseInputSource final
{
public:
/** Possible mouse input sources. */


Loading…
Cancel
Save