1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Removed some legacy friend class declarations that are no longer needed with modern compilers

This commit is contained in:
jules 2018-06-13 16:58:36 +01:00
parent 6d55fe78fe
commit 974b4a8351
56 changed files with 64 additions and 179 deletions

View file

@ -103,9 +103,6 @@ private:
#if ! JUCER_ENABLE_GPL_MODE #if ! JUCER_ENABLE_GPL_MODE
//============================================================================== //==============================================================================
struct ModalCompletionCallback; struct ModalCompletionCallback;
friend struct ModalCompletionCallback;
friend struct ContainerDeletePolicy<LicenseThread>;
friend struct LicenseThread; friend struct LicenseThread;
//============================================================================== //==============================================================================

View file

@ -504,8 +504,6 @@ private:
//============================================================================== //==============================================================================
class CallbackHandler; class CallbackHandler;
friend class CallbackHandler;
friend struct ContainerDeletePolicy<CallbackHandler>;
std::unique_ptr<CallbackHandler> callbackHandler; std::unique_ptr<CallbackHandler> callbackHandler;
void audioDeviceIOCallbackInt (const float** inputChannelData, int totalNumInputChannels, void audioDeviceIOCallbackInt (const float** inputChannelData, int totalNumInputChannels,

View file

@ -38,6 +38,37 @@ namespace
class AlsaClient : public ReferenceCountedObject class AlsaClient : public ReferenceCountedObject
{ {
public: public:
AlsaClient()
{
jassert (instance == nullptr);
snd_seq_open (&handle, "default", SND_SEQ_OPEN_DUPLEX, 0);
if (handle != nullptr)
{
snd_seq_nonblock (handle, SND_SEQ_NONBLOCK);
snd_seq_set_client_name (handle, JUCE_ALSA_MIDI_NAME);
clientId = snd_seq_client_id (handle);
// It's good idea to pre-allocate a good number of elements
ports.ensureStorageAllocated (32);
}
}
~AlsaClient()
{
jassert (instance != nullptr);
instance = nullptr;
if (handle != nullptr)
snd_seq_close (handle);
jassert (activeCallbacks.get() == 0);
if (inputThread)
inputThread->stopThread (3000);
}
using Ptr = ReferenceCountedObjectPtr<AlsaClient>; using Ptr = ReferenceCountedObjectPtr<AlsaClient>;
//============================================================================== //==============================================================================
@ -251,42 +282,6 @@ private:
static AlsaClient* instance; static AlsaClient* instance;
//==============================================================================
friend class ReferenceCountedObjectPtr<AlsaClient>;
friend struct ContainerDeletePolicy<AlsaClient>;
AlsaClient()
{
jassert (instance == nullptr);
snd_seq_open (&handle, "default", SND_SEQ_OPEN_DUPLEX, 0);
if (handle != nullptr)
{
snd_seq_nonblock (handle, SND_SEQ_NONBLOCK);
snd_seq_set_client_name (handle, JUCE_ALSA_MIDI_NAME);
clientId = snd_seq_client_id (handle);
// It's good idea to pre-allocate a good number of elements
ports.ensureStorageAllocated (32);
}
}
~AlsaClient()
{
jassert (instance != nullptr);
instance = nullptr;
if (handle != nullptr)
snd_seq_close (handle);
jassert (activeCallbacks.get() == 0);
if (inputThread)
inputThread->stopThread (3000);
}
//============================================================================== //==============================================================================
class MidiInputThread : public Thread class MidiInputThread : public Thread
{ {

View file

@ -240,7 +240,6 @@ public:
private: private:
class Buffer; class Buffer;
friend struct ContainerDeletePolicy<Buffer>;
std::unique_ptr<Buffer> buffer; std::unique_ptr<Buffer> buffer;
}; };

View file

@ -113,8 +113,6 @@ private:
std::unique_ptr<TableListBoxModel> tableModel; std::unique_ptr<TableListBoxModel> tableModel;
class Scanner; class Scanner;
friend class Scanner;
friend struct ContainerDeletePolicy<Scanner>;
std::unique_ptr<Scanner> currentScanner; std::unique_ptr<Scanner> currentScanner;
void scanFinished (const StringArray&); void scanFinished (const StringArray&);

View file

@ -197,7 +197,6 @@ public:
private: private:
struct Pimpl; struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SliderAttachment) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SliderAttachment)
}; };
@ -226,7 +225,6 @@ public:
private: private:
struct Pimpl; struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComboBoxAttachment) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComboBoxAttachment)
}; };
@ -250,7 +248,6 @@ public:
private: private:
struct Pimpl; struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonAttachment) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonAttachment)
}; };

View file

@ -162,7 +162,6 @@ private:
AudioCDBurner (const int deviceIndex); AudioCDBurner (const int deviceIndex);
class Pimpl; class Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioCDBurner) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioCDBurner)

View file

@ -105,7 +105,6 @@ private:
const bool hideAdvancedOptionsWithButton; const bool hideAdvancedOptionsWithButton;
class MidiInputSelectorComponentListBox; class MidiInputSelectorComponentListBox;
friend struct ContainerDeletePolicy<MidiInputSelectorComponentListBox>;
std::unique_ptr<MidiInputSelectorComponentListBox> midiInputsList; std::unique_ptr<MidiInputSelectorComponentListBox> midiInputsList;
std::unique_ptr<ComboBox> midiOutputSelector; std::unique_ptr<ComboBox> midiOutputSelector;
std::unique_ptr<Label> midiInputsLabel, midiOutputLabel; std::unique_ptr<Label> midiInputsLabel, midiOutputLabel;

View file

@ -201,13 +201,6 @@ private:
class ThumbData; class ThumbData;
class CachedWindow; class CachedWindow;
friend class LevelDataSource;
friend class ThumbData;
friend class CachedWindow;
friend struct ContainerDeletePolicy<LevelDataSource>;
friend struct ContainerDeletePolicy<ThumbData>;
friend struct ContainerDeletePolicy<CachedWindow>;
std::unique_ptr<LevelDataSource> source; std::unique_ptr<LevelDataSource> source;
std::unique_ptr<CachedWindow> window; std::unique_ptr<CachedWindow> window;
OwnedArray<ThumbData> channels; OwnedArray<ThumbData> channels;

View file

@ -106,7 +106,6 @@ private:
TimeSliceThread thread; TimeSliceThread thread;
class ThumbnailCacheEntry; class ThumbnailCacheEntry;
friend struct ContainerDeletePolicy<ThumbnailCacheEntry>;
OwnedArray<ThumbnailCacheEntry> thumbs; OwnedArray<ThumbnailCacheEntry> thumbs;
CriticalSection lock; CriticalSection lock;
int maxNumThumbsToStore; int maxNumThumbsToStore;

View file

@ -121,8 +121,6 @@ public:
private: private:
struct ChannelInfo; struct ChannelInfo;
friend struct ChannelInfo;
friend struct ContainerDeletePolicy<ChannelInfo>;
OwnedArray<ChannelInfo> channels; OwnedArray<ChannelInfo> channels;
int numSamples, inputSamplesPerBlock; int numSamples, inputSamplesPerBlock;

View file

@ -286,18 +286,18 @@ public:
private: private:
//============================================================================== //==============================================================================
class VariantType; friend class VariantType; class VariantType;
class VariantType_Void; friend class VariantType_Void; class VariantType_Void;
class VariantType_Undefined; friend class VariantType_Undefined; class VariantType_Undefined;
class VariantType_Int; friend class VariantType_Int; class VariantType_Int;
class VariantType_Int64; friend class VariantType_Int64; class VariantType_Int64;
class VariantType_Double; friend class VariantType_Double; class VariantType_Double;
class VariantType_Bool; friend class VariantType_Bool; class VariantType_Bool;
class VariantType_String; friend class VariantType_String; class VariantType_String;
class VariantType_Object; friend class VariantType_Object; class VariantType_Object;
class VariantType_Array; friend class VariantType_Array; class VariantType_Array;
class VariantType_Binary; friend class VariantType_Binary; class VariantType_Binary;
class VariantType_Method; friend class VariantType_Method; class VariantType_Method;
union ValueUnion union ValueUnion
{ {

View file

@ -118,9 +118,8 @@ public:
private: private:
//============================================================================== //==============================================================================
class NativeIterator struct NativeIterator
{ {
public:
NativeIterator (const File& directory, const String& wildCard); NativeIterator (const File& directory, const String& wildCard);
~NativeIterator(); ~NativeIterator();
@ -129,16 +128,11 @@ private:
Time* modTime, Time* creationTime, bool* isReadOnly); Time* modTime, Time* creationTime, bool* isReadOnly);
class Pimpl; class Pimpl;
private:
friend class DirectoryIterator;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NativeIterator) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NativeIterator)
}; };
friend struct ContainerDeletePolicy<NativeIterator::Pimpl>;
StringArray wildCards; StringArray wildCards;
NativeIterator fileFinder; NativeIterator fileFinder;
String wildCard, path; String wildCard, path;

View file

@ -243,10 +243,6 @@ private:
//============================================================================== //==============================================================================
class Term; class Term;
struct Helpers; struct Helpers;
friend class Term;
friend struct Helpers;
friend struct ContainerDeletePolicy<Term>;
friend class ReferenceCountedObjectPtr<Term>;
ReferenceCountedObjectPtr<Term> term; ReferenceCountedObjectPtr<Term> term;
explicit Expression (Term*); explicit Expression (Term*);

View file

@ -537,7 +537,6 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Upload) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Upload)
}; };
friend struct ContainerDeletePolicy<Upload>;
ReferenceCountedArray<Upload> filesToUpload; ReferenceCountedArray<Upload> filesToUpload;
#if JUCE_IOS #if JUCE_IOS

View file

@ -191,7 +191,6 @@ private:
StringArray countryCodes; StringArray countryCodes;
StringPairArray translations; StringPairArray translations;
std::unique_ptr<LocalisedStrings> fallback; std::unique_ptr<LocalisedStrings> fallback;
friend struct ContainerDeletePolicy<LocalisedStrings>;
void loadFromText (const String&, bool ignoreCase); void loadFromText (const String&, bool ignoreCase);

View file

@ -104,7 +104,6 @@ public:
private: private:
//============================================================================== //==============================================================================
class ActiveProcess; class ActiveProcess;
friend struct ContainerDeletePolicy<ActiveProcess>;
std::unique_ptr<ActiveProcess> activeProcess; std::unique_ptr<ActiveProcess> activeProcess;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcess) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcess)

View file

@ -94,8 +94,6 @@ public:
private: private:
struct Pimpl; struct Pimpl;
friend struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HighResolutionTimer) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HighResolutionTimer)

View file

@ -110,7 +110,6 @@ public:
private: private:
//============================================================================== //==============================================================================
class Pimpl; class Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
CriticalSection lock; CriticalSection lock;

View file

@ -322,8 +322,6 @@ private:
struct ThreadPoolThread; struct ThreadPoolThread;
friend class ThreadPoolJob; friend class ThreadPoolJob;
friend struct ThreadPoolThread;
friend struct ContainerDeletePolicy<ThreadPoolThread>;
OwnedArray<ThreadPoolThread> threads; OwnedArray<ThreadPoolThread> threads;
CriticalSection lock; CriticalSection lock;

View file

@ -100,7 +100,6 @@ private:
OptionalScopedPointer<OutputStream> destStream; OptionalScopedPointer<OutputStream> destStream;
class GZIPCompressorHelper; class GZIPCompressorHelper;
friend struct ContainerDeletePolicy<GZIPCompressorHelper>;
std::unique_ptr<GZIPCompressorHelper> helper; std::unique_ptr<GZIPCompressorHelper> helper;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GZIPCompressorOutputStream) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GZIPCompressorOutputStream)

View file

@ -90,7 +90,6 @@ private:
HeapBlock<uint8> buffer; HeapBlock<uint8> buffer;
class GZIPDecompressHelper; class GZIPDecompressHelper;
friend struct ContainerDeletePolicy<GZIPDecompressHelper>;
std::unique_ptr<GZIPDecompressHelper> helper; std::unique_ptr<GZIPDecompressHelper> helper;
#if JUCE_CATCH_DEPRECATED_CODE_MISUSE #if JUCE_CATCH_DEPRECATED_CODE_MISUSE

View file

@ -224,7 +224,6 @@ public:
//============================================================================== //==============================================================================
private: private:
struct Item; struct Item;
friend struct ContainerDeletePolicy<Item>;
OwnedArray<Item> items; OwnedArray<Item> items;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Builder) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Builder)

View file

@ -246,7 +246,6 @@ public:
private: private:
//============================================================================== //==============================================================================
struct ActionSet; struct ActionSet;
friend struct ContainerDeletePolicy<ActionSet>;
OwnedArray<ActionSet> transactions, stashedFutureTransactions; OwnedArray<ActionSet> transactions, stashedFutureTransactions;
String newTransactionName; String newTransactionName;
int totalUnitsStored = 0, maxNumUnitsToKeep = 0, minimumTransactionsToKeep = 0, nextIndex = 0; int totalUnitsStored = 0, maxNumUnitsToKeep = 0, minimumTransactionsToKeep = 0, nextIndex = 0;

View file

@ -104,8 +104,6 @@ public:
private: private:
struct Connection; struct Connection;
friend struct Connection;
friend struct ContainerDeletePolicy<Connection>;
std::unique_ptr<Connection> connection; std::unique_ptr<Connection> connection;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessSlave) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessSlave)
@ -194,8 +192,6 @@ private:
std::unique_ptr<ChildProcess> childProcess; std::unique_ptr<ChildProcess> childProcess;
struct Connection; struct Connection;
friend struct Connection;
friend struct ContainerDeletePolicy<Connection>;
std::unique_ptr<Connection> connection; std::unique_ptr<Connection> connection;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessMaster) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessMaster)

View file

@ -197,9 +197,8 @@ private:
int readData (void*, int); int readData (void*, int);
struct ConnectionThread; struct ConnectionThread;
friend struct ConnectionThread;
friend struct ContainerDeletePolicy<ConnectionThread>;
std::unique_ptr<ConnectionThread> thread; std::unique_ptr<ConnectionThread> thread;
void runThread(); void runThread();
int writeData (void*, int); int writeData (void*, int);

View file

@ -290,8 +290,6 @@ private:
bool stillInitialising = true; bool stillInitialising = true;
struct MultipleInstanceHandler; struct MultipleInstanceHandler;
friend struct MultipleInstanceHandler;
friend struct ContainerDeletePolicy<MultipleInstanceHandler>;
std::unique_ptr<MultipleInstanceHandler> multipleInstanceHandler; std::unique_ptr<MultipleInstanceHandler> multipleInstanceHandler;
JUCE_DECLARE_NON_COPYABLE (JUCEApplicationBase) JUCE_DECLARE_NON_COPYABLE (JUCEApplicationBase)

View file

@ -48,7 +48,6 @@ public:
private: private:
JUCE_PUBLIC_IN_DLL_BUILD (struct Pimpl) JUCE_PUBLIC_IN_DLL_BUILD (struct Pimpl)
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MountedVolumeListChangeDetector) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MountedVolumeListChangeDetector)

View file

@ -155,9 +155,8 @@ protected:
private: private:
//============================================================================== //==============================================================================
class GlyphInfo; class GlyphInfo;
friend struct ContainerDeletePolicy<GlyphInfo>;
OwnedArray<GlyphInfo> glyphs; OwnedArray<GlyphInfo> glyphs;
short lookupTable [128]; short lookupTable[128];
GlyphInfo* findGlyph (const juce_wchar character, bool loadIfNeeded) noexcept; GlyphInfo* findGlyph (const juce_wchar character, bool loadIfNeeded) noexcept;

View file

@ -153,7 +153,6 @@ protected:
private: private:
struct HintingParams; struct HintingParams;
friend struct ContainerDeletePolicy<HintingParams>;
std::unique_ptr<HintingParams> hintingParams; std::unique_ptr<HintingParams> hintingParams;
CriticalSection hintingLock; CriticalSection hintingLock;

View file

@ -208,7 +208,6 @@ public:
} }
private: private:
friend struct ContainerDeletePolicy<CachedGlyphType>;
ReferenceCountedArray<CachedGlyphType> glyphs; ReferenceCountedArray<CachedGlyphType> glyphs;
Atomic<int> accessCounter, hits, misses; Atomic<int> accessCounter, hits, misses;
CriticalSection lock; CriticalSection lock;

View file

@ -96,8 +96,6 @@ private:
Rectangle<int> bounds; Rectangle<int> bounds;
struct Pimpl; struct Pimpl;
friend struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Direct2DLowLevelGraphicsContext) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Direct2DLowLevelGraphicsContext)

View file

@ -482,8 +482,6 @@ private:
ListenerList<Listener> buttonListeners; ListenerList<Listener> buttonListeners;
struct CallbackHelper; struct CallbackHelper;
friend struct CallbackHelper;
friend struct ContainerDeletePolicy<CallbackHelper>;
std::unique_ptr<CallbackHelper> callbackHelper; std::unique_ptr<CallbackHelper> callbackHelper;
uint32 buttonPressTime = 0, lastRepeatTime = 0; uint32 buttonPressTime = 0, lastRepeatTime = 0;
ApplicationCommandManager* commandManagerToUse = nullptr; ApplicationCommandManager* commandManagerToUse = nullptr;

View file

@ -2280,8 +2280,6 @@ private:
std::unique_ptr<CachedComponentImage> cachedImage; std::unique_ptr<CachedComponentImage> cachedImage;
class MouseListenerList; class MouseListenerList;
friend class MouseListenerList;
friend struct ContainerDeletePolicy<MouseListenerList>;
std::unique_ptr<MouseListenerList> mouseListeners; std::unique_ptr<MouseListenerList> mouseListeners;
std::unique_ptr<Array<KeyListener*>> keyListeners; std::unique_ptr<Array<KeyListener*>> keyListeners;
ListenerList<ComponentListener> componentListeners; ListenerList<ComponentListener> componentListeners;

View file

@ -141,10 +141,9 @@ protected:
private: private:
//============================================================================== //==============================================================================
struct ModalItem;
friend class Component; friend class Component;
friend struct ContainerDeletePolicy<ModalItem>;
struct ModalItem;
OwnedArray<ModalItem> stack; OwnedArray<ModalItem> stack;
void startModal (Component*, bool autoDelete); void startModal (Component*, bool autoDelete);

View file

@ -125,11 +125,6 @@ private:
class PanelHolder; class PanelHolder;
struct PanelSizes; struct PanelSizes;
friend class PanelHolder;
friend struct PanelSizes;
friend struct ContainerDeletePolicy<PanelSizes>;
friend struct ContainerDeletePolicy<PanelHolder>;
std::unique_ptr<PanelSizes> currentSizes; std::unique_ptr<PanelSizes> currentSizes;
OwnedArray<PanelHolder> holders; OwnedArray<PanelHolder> holders;
ComponentAnimator animator; ComponentAnimator animator;

View file

@ -420,7 +420,6 @@ private:
int initialDelayInMillisecs = 100, repeatDelayInMillisecs = 50, minimumDelayInMillisecs = 10; int initialDelayInMillisecs = 100, repeatDelayInMillisecs = 50, minimumDelayInMillisecs = 10;
bool vertical, isDraggingThumb = false, autohides = true, userVisibilityFlag = false; bool vertical, isDraggingThumb = false, autohides = true, userVisibilityFlag = false;
class ScrollbarButton; class ScrollbarButton;
friend struct ContainerDeletePolicy<ScrollbarButton>;
std::unique_ptr<ScrollbarButton> upButton, downButton; std::unique_ptr<ScrollbarButton> upButton, downButton;
ListenerList<Listener> listeners; ListenerList<Listener> listeners;

View file

@ -359,8 +359,6 @@ private:
int currentTabIndex = -1; int currentTabIndex = -1;
class BehindFrontTabComp; class BehindFrontTabComp;
friend class BehindFrontTabComp;
friend struct ContainerDeletePolicy<BehindFrontTabComp>;
std::unique_ptr<BehindFrontTabComp> behindFrontTab; std::unique_ptr<BehindFrontTabComp> behindFrontTab;
std::unique_ptr<Button> extraTabsButton; std::unique_ptr<Button> extraTabsButton;

View file

@ -322,8 +322,6 @@ private:
bool vScrollbarRight = true, hScrollbarBottom = true; bool vScrollbarRight = true, hScrollbarBottom = true;
struct DragToScrollListener; struct DragToScrollListener;
friend struct DragToScrollListener;
friend struct ContainerDeletePolicy<DragToScrollListener>;
std::unique_ptr<DragToScrollListener> dragToScrollListener; std::unique_ptr<DragToScrollListener> dragToScrollListener;
Point<int> viewportPosToCompPos (Point<int>) const; Point<int> viewportPosToCompPos (Point<int>) const;

View file

@ -230,8 +230,6 @@ protected:
private: private:
//============================================================================== //==============================================================================
class DragImageComponent; class DragImageComponent;
friend class DragImageComponent;
friend struct ContainerDeletePolicy<DragImageComponent>;
OwnedArray<DragImageComponent> dragImageComponents; OwnedArray<DragImageComponent> dragImageComponents;
const MouseInputSource* getMouseInputSourceForDrag (Component* sourceComponent, const MouseInputSource* inputSourceCausingDrag); const MouseInputSource* getMouseInputSourceForDrag (Component* sourceComponent, const MouseInputSource* inputSourceCausingDrag);

View file

@ -977,8 +977,6 @@ public:
private: private:
//============================================================================== //==============================================================================
JUCE_PUBLIC_IN_DLL_BUILD (class Pimpl) JUCE_PUBLIC_IN_DLL_BUILD (class Pimpl)
friend class Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
void init (SliderStyle, TextEntryBoxPosition); void init (SliderStyle, TextEntryBoxPosition);

View file

@ -900,15 +900,12 @@ public:
void itemDropped (const SourceDetails&) override; void itemDropped (const SourceDetails&) override;
private: private:
friend class TreeViewItem;
class ContentComponent; class ContentComponent;
class TreeViewport; class TreeViewport;
class InsertPointHighlight; class InsertPointHighlight;
class TargetGroupHighlight; class TargetGroupHighlight;
friend class TreeViewItem;
friend class ContentComponent;
friend struct ContainerDeletePolicy<TreeViewport>;
friend struct ContainerDeletePolicy<InsertPointHighlight>;
friend struct ContainerDeletePolicy<TargetGroupHighlight>;
std::unique_ptr<TreeViewport> viewport; std::unique_ptr<TreeViewport> viewport;
CriticalSection nodeAlterationLock; CriticalSection nodeAlterationLock;

View file

@ -286,7 +286,6 @@ private:
MenuBarModel* menuBarModel = nullptr; MenuBarModel* menuBarModel = nullptr;
class ButtonListenerProxy; class ButtonListenerProxy;
friend struct ContainerDeletePolicy<ButtonListenerProxy>;
std::unique_ptr<ButtonListenerProxy> buttonListener; std::unique_ptr<ButtonListenerProxy> buttonListener;
void repaintTitleBar(); void repaintTitleBar();

View file

@ -382,13 +382,9 @@ private:
ApplicationCommandManager* appCommandManager = nullptr; ApplicationCommandManager* appCommandManager = nullptr;
class Pimpl; class Pimpl;
friend class Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
class GutterComponent; class GutterComponent;
friend class GutterComponent;
friend struct ContainerDeletePolicy<GutterComponent>;
std::unique_ptr<GutterComponent> gutter; std::unique_ptr<GutterComponent> gutter;
enum DragType enum DragType

View file

@ -118,7 +118,6 @@ public:
private: private:
class Pimpl; class Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> control; std::unique_ptr<Pimpl> control;
bool mouseEventsAllowed = true; bool mouseEventsAllowed = true;

View file

@ -80,7 +80,6 @@ public:
private: private:
class Pimpl; class Pimpl;
friend class Pimpl;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UIViewComponent) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UIViewComponent)

View file

@ -107,7 +107,6 @@ private:
friend unsigned long juce_getCurrentFocusWindow (ComponentPeer*); friend unsigned long juce_getCurrentFocusWindow (ComponentPeer*);
class Pimpl; class Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
}; };

View file

@ -142,10 +142,6 @@ private:
class ColourComponentSlider; class ColourComponentSlider;
class ColourSpaceMarker; class ColourSpaceMarker;
class HueSelectorMarker; class HueSelectorMarker;
friend class ColourSpaceView;
friend struct ContainerDeletePolicy<ColourSpaceView>;
friend class HueSelectorComp;
friend struct ContainerDeletePolicy<HueSelectorComp>;
Colour colour; Colour colour;
float h, s, v; float h, s, v;

View file

@ -125,9 +125,6 @@ private:
class MappingItem; class MappingItem;
class CategoryItem; class CategoryItem;
class ItemComponent; class ItemComponent;
friend class TopLevelItem;
friend struct ContainerDeletePolicy<ChangeKeyButton>;
friend struct ContainerDeletePolicy<TopLevelItem>;
std::unique_ptr<TopLevelItem> treeItem; std::unique_ptr<TopLevelItem> treeItem;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KeyMappingEditorComponent) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KeyMappingEditorComponent)

View file

@ -220,8 +220,6 @@ namespace LiveConstantEditor
OwnedArray<CodeDocument> documents; OwnedArray<CodeDocument> documents;
Array<File> documentFiles; Array<File> documentFiles;
class EditorWindow; class EditorWindow;
friend class EditorWindow;
friend struct ContainerDeletePolicy<EditorWindow>;
Component::SafePointer<EditorWindow> editorWindow; Component::SafePointer<EditorWindow> editorWindow;
CriticalSection lock; CriticalSection lock;

View file

@ -73,9 +73,21 @@ public:
}; };
//============================================================================== //==============================================================================
class SharedKeyWindow : public ReferenceCountedObject struct SharedKeyWindow : public ReferenceCountedObject
{ {
public: SharedKeyWindow (ComponentPeer* peerToUse)
: keyPeer (peerToUse),
keyProxy (juce_createKeyProxyWindow (keyPeer))
{}
~SharedKeyWindow()
{
juce_deleteKeyProxyWindow (keyPeer);
auto& keyWindows = getKeyWindows();
keyWindows.remove (keyPeer);
}
using Ptr = ReferenceCountedObjectPtr<SharedKeyWindow>; using Ptr = ReferenceCountedObjectPtr<SharedKeyWindow>;
//============================================================================== //==============================================================================
@ -110,21 +122,6 @@ public:
private: private:
//============================================================================== //==============================================================================
friend struct ContainerDeletePolicy<SharedKeyWindow>;
SharedKeyWindow (ComponentPeer* peerToUse)
: keyPeer (peerToUse),
keyProxy (juce_createKeyProxyWindow (keyPeer))
{}
~SharedKeyWindow()
{
juce_deleteKeyProxyWindow (keyPeer);
auto& keyWindows = getKeyWindows();
keyWindows.remove (keyPeer);
}
ComponentPeer* keyPeer; ComponentPeer* keyPeer;
Window keyProxy; Window keyProxy;

View file

@ -123,11 +123,9 @@ public:
private: private:
class Pimpl; class Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
class SavedState; class SavedState;
friend struct ContainerDeletePolicy<SavedState>;
std::unique_ptr<SavedState> savedState; std::unique_ptr<SavedState> savedState;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenGLFrameBuffer) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenGLFrameBuffer)

View file

@ -216,8 +216,6 @@ public:
private: private:
//============================================================================== //==============================================================================
struct Pimpl; struct Pimpl;
friend struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
friend struct OSCReceiverCallbackMessage; friend struct OSCReceiverCallbackMessage;

View file

@ -141,8 +141,6 @@ public:
private: private:
//============================================================================== //==============================================================================
struct Pimpl; struct Pimpl;
friend struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OSCSender) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OSCSender)

View file

@ -220,8 +220,6 @@ private:
String name; String name;
struct Pimpl; struct Pimpl;
friend struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
struct ViewerComponent; struct ViewerComponent;

View file

@ -172,8 +172,6 @@ public:
private: private:
//============================================================================== //==============================================================================
struct Pimpl; struct Pimpl;
friend struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
std::unique_ptr<Pimpl> pimpl; std::unique_ptr<Pimpl> pimpl;
void resized() override; void resized() override;