Add wxNODISCARD to all Clone*() functions that return a pointer

Calling a Clone*() function without using its return value is in most
(even all) cases a certain way to leak memory.

Closes #25354.
This commit is contained in:
Lauri Nurmi
2025-04-30 19:40:45 +02:00
committed by Vadim Zeitlin
parent 10f11159f1
commit 5438f42b4a
135 changed files with 254 additions and 254 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ public:
bool ConvertToImage(unsigned int frame, wxImage *image) const override;
wxAnimationDecoder *Clone() const override
wxNODISCARD wxAnimationDecoder *Clone() const override
{ return new wxANIDecoder; }
wxAnimationType GetType() const override
{ return wxANIMATION_TYPE_ANI; }
+1 -1
View File
@@ -100,7 +100,7 @@ public:
CallIfCanSeek(&wxAnimationDecoder::DoCanRead, this);
}
virtual wxAnimationDecoder *Clone() const = 0;
wxNODISCARD virtual wxAnimationDecoder *Clone() const = 0;
virtual wxAnimationType GetType() const = 0;
// convert given frame to wxImage
+1 -1
View File
@@ -55,7 +55,7 @@ public:
virtual void SetName(const wxString& name,
wxPathFormat format = wxPATH_NATIVE) = 0;
wxArchiveEntry *Clone() const { return DoClone(); }
wxNODISCARD wxArchiveEntry *Clone() const { return DoClone(); }
void SetNotifier(wxArchiveNotifier& notifier);
virtual void UnsetNotifier() { m_notifier = nullptr; }
+3 -3
View File
@@ -77,7 +77,7 @@ public:
m_isDropdownClicked = false;
m_toolId = -1;
}
wxEvent *Clone() const override { return new wxAuiToolBarEvent(*this); }
wxNODISCARD wxEvent *Clone() const override { return new wxAuiToolBarEvent(*this); }
bool IsDropDownClicked() const { return m_isDropdownClicked; }
void SetDropDownClicked(bool c) { m_isDropdownClicked = c; }
@@ -269,7 +269,7 @@ public:
wxAuiToolBarArt() = default;
virtual ~wxAuiToolBarArt() = default;
virtual wxAuiToolBarArt* Clone() = 0;
wxNODISCARD virtual wxAuiToolBarArt* Clone() = 0;
virtual void SetFlags(unsigned int flags) = 0;
virtual unsigned int GetFlags() = 0;
virtual void SetFont(const wxFont& font) = 0;
@@ -367,7 +367,7 @@ public:
wxAuiGenericToolBarArt();
virtual ~wxAuiGenericToolBarArt();
virtual wxAuiToolBarArt* Clone() override;
wxNODISCARD virtual wxAuiToolBarArt* Clone() override;
virtual void SetFlags(unsigned int flags) override;
virtual unsigned int GetFlags() override;
virtual void SetFont(const wxFont& font) override;
+1 -1
View File
@@ -77,7 +77,7 @@ public:
{
m_dragSource = nullptr;
}
wxEvent *Clone() const override { return new wxAuiNotebookEvent(*this); }
wxNODISCARD wxEvent *Clone() const override { return new wxAuiNotebookEvent(*this); }
void SetDragSource(wxAuiNotebook* s) { m_dragSource = s; }
wxAuiNotebook* GetDragSource() const { return m_dragSource; }
+1 -1
View File
@@ -19,7 +19,7 @@ class WXDLLIMPEXP_AUI wxAuiMSWToolBarArt : public wxAuiGenericToolBarArt
public:
wxAuiMSWToolBarArt();
virtual wxAuiToolBarArt* Clone() override;
wxNODISCARD virtual wxAuiToolBarArt* Clone() override;
virtual void DrawBackground(
wxDC& dc,
+2 -2
View File
@@ -37,7 +37,7 @@ public:
wxAuiDockArt() = default;
virtual ~wxAuiDockArt() = default;
virtual wxAuiDockArt* Clone() = 0;
wxNODISCARD virtual wxAuiDockArt* Clone() = 0;
// This function should be used for querying metrics in the new code, as it
// will scale them by the DPI of the provided window if necessary. The
@@ -102,7 +102,7 @@ public:
wxAuiDefaultDockArt();
wxAuiDockArt* Clone() override;
wxNODISCARD wxAuiDockArt* Clone() override;
int GetMetric(int metricId) override;
void SetMetric(int metricId, int newVal) override;
wxColour GetColour(int id) override;
+1 -1
View File
@@ -675,7 +675,7 @@ public:
canveto_flag = true;
dc = nullptr;
}
wxEvent *Clone() const override { return new wxAuiManagerEvent(*this); }
wxNODISCARD wxEvent *Clone() const override { return new wxAuiManagerEvent(*this); }
void SetManager(wxAuiManager* mgr) { manager = mgr; }
void SetPane(wxAuiPaneInfo* p) { pane = p; }
+4 -4
View File
@@ -48,7 +48,7 @@ public:
wxAuiTabArt() = default;
virtual ~wxAuiTabArt() = default;
virtual wxAuiTabArt* Clone() = 0;
wxNODISCARD virtual wxAuiTabArt* Clone() = 0;
virtual void SetFlags(unsigned int flags) = 0;
virtual void SetSizingInfo(const wxSize& tabCtrlSize,
@@ -298,7 +298,7 @@ public:
wxAuiFlatTabArt(const wxAuiFlatTabArt&) = delete;
wxAuiFlatTabArt& operator=(const wxAuiFlatTabArt&) = delete;
wxAuiTabArt* Clone() override;
wxNODISCARD wxAuiTabArt* Clone() override;
void SetColour(const wxColour& colour) override;
void SetActiveColour(const wxColour& colour) override;
@@ -348,7 +348,7 @@ public:
wxAuiGenericTabArt();
wxAuiTabArt* Clone() override;
wxNODISCARD wxAuiTabArt* Clone() override;
void SetColour(const wxColour& colour) override;
void SetActiveColour(const wxColour& colour) override;
@@ -404,7 +404,7 @@ public:
wxAuiSimpleTabArt();
wxAuiTabArt* Clone() override;
wxNODISCARD wxAuiTabArt* Clone() override;
void SetColour(const wxColour& colour) override;
void SetActiveColour(const wxColour& colour) override;
+1 -1
View File
@@ -30,7 +30,7 @@ class WXDLLIMPEXP_AUI wxAuiGtkTabArt : public wxAuiGenericTabArt
public:
wxAuiGtkTabArt();
virtual wxAuiTabArt* Clone() override;
wxNODISCARD virtual wxAuiTabArt* Clone() override;
virtual void DrawBorder(wxDC& dc, wxWindow* wnd, const wxRect& rect) override;
virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect) override;
virtual void DrawTab(wxDC& dc,
+1 -1
View File
@@ -22,7 +22,7 @@ public:
wxAuiMSWTabArt();
virtual ~wxAuiMSWTabArt();
wxAuiTabArt* Clone() override;
wxNODISCARD wxAuiTabArt* Clone() override;
void DrawBorder(
wxDC& dc,
+1 -1
View File
@@ -401,7 +401,7 @@ public:
m_nOldSel = event.m_nOldSel;
}
virtual wxEvent *Clone() const override { return new wxBookCtrlEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxBookCtrlEvent(*this); }
// accessors
// the currently selected page (wxNOT_FOUND if none)
+1 -1
View File
@@ -166,7 +166,7 @@ public:
void SetWeekDay(wxDateTime::WeekDay wd) { m_wday = wd; }
wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
virtual wxEvent *Clone() const override { return new wxCalendarEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxCalendarEvent(*this); }
private:
wxDateTime::WeekDay m_wday;
+1 -1
View File
@@ -116,7 +116,7 @@ public:
bool SupportsFormat(const wxDataFormat& format) const;
void AddFormat(const wxDataFormat& format);
virtual wxEvent *Clone() const override
wxNODISCARD virtual wxEvent *Clone() const override
{
return new wxClipboardEvent(*this);
}
+1 -1
View File
@@ -177,7 +177,7 @@ public:
// default copy ctor, assignment operator and dtor are ok
virtual wxEvent *Clone() const override { return new wxColourPickerEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxColourPickerEvent(*this); }
private:
wxColour m_colour;
+1 -1
View File
@@ -86,7 +86,7 @@ public:
// default copy ctor, assignment operator and dtor are ok
virtual wxEvent *Clone() const override { return new wxCollapsiblePaneEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxCollapsiblePaneEvent(*this); }
private:
bool m_bCollapsed;
+1 -1
View File
@@ -56,7 +56,7 @@ public:
wxColour GetColour() const { return m_colour; }
void SetColour(const wxColour& colour) { m_colour = colour; }
virtual wxEvent *Clone() const override
wxNODISCARD virtual wxEvent *Clone() const override
{
return new wxColourDialogEvent(*this);
}
+1 -1
View File
@@ -203,7 +203,7 @@ protected:
return nullptr;
}
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const override
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const override
{
wxFAIL_MSG( "must be overridden if used" );
+1 -1
View File
@@ -80,7 +80,7 @@ public:
virtual bool IsUTF8() const override { return m_conv && m_conv->IsUTF8(); }
virtual wxMBConv *Clone() const override { return new wxConvAuto(*this); }
wxNODISCARD virtual wxMBConv *Clone() const override { return new wxConvAuto(*this); }
// return the BOM type of this buffer
static wxBOM DetectBOM(const char *src, size_t srcLen);
+1 -1
View File
@@ -953,7 +953,7 @@ public:
void InitData(wxDataObjectComposite* obj, wxDataFormat format);
#endif // wxUSE_DRAG_AND_DROP
virtual wxEvent *Clone() const override { return new wxDataViewEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxDataViewEvent(*this); }
// These methods shouldn't be used outside of wxWidgets and wxWidgets
// itself doesn't use them any longer either as it constructs the events
+1 -1
View File
@@ -33,7 +33,7 @@ public:
void SetDate(const wxDateTime &date) { m_date = date; }
// default copy ctor, assignment operator and dtor are ok
virtual wxEvent *Clone() const override { return new wxDateEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxDateEvent(*this); }
private:
wxDateTime m_date;
+1 -1
View File
@@ -87,7 +87,7 @@ public:
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
void InitFromImage(const wxImage& image, int depth, double scale);
+1 -1
View File
@@ -55,7 +55,7 @@ public:
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxDECLARE_DYNAMIC_CLASS(wxBrush);
};
+1 -1
View File
@@ -38,7 +38,7 @@ protected:
// ref counting code
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxDECLARE_DYNAMIC_CLASS(wxCursor);
};
+1 -1
View File
@@ -111,7 +111,7 @@ public:
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
virtual wxFontFamily DoGetFamily() const;
+1 -1
View File
@@ -68,7 +68,7 @@ public:
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxDECLARE_DYNAMIC_CLASS(wxPen);
};
+1 -1
View File
@@ -41,7 +41,7 @@ public:
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
// wxRegionBase pure virtuals
virtual bool DoIsEqual(const wxRegion& region) const;
+1 -1
View File
@@ -389,7 +389,7 @@ public:
int GetReturnCode() const
{ return GetDialog()->GetReturnCode(); }
virtual wxEvent *Clone() const override { return new wxWindowModalDialogEvent (*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxWindowModalDialogEvent (*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxWindowModalDialogEvent);
+1 -1
View File
@@ -177,7 +177,7 @@ public:
bool IsOwnEvent() const { return m_id != 0; }
// implement the base class pure virtual
virtual wxEvent *Clone() const override { return new wxDialUpEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxDialUpEvent(*this); }
private:
wxDECLARE_NO_ASSIGN_DEF_COPY(wxDialUpEvent);
+2 -2
View File
@@ -276,7 +276,7 @@ template <typename T>
class wxDefaultBaseObjectArrayTraits
{
public:
static T* Clone(const T& value) { return new T{value}; }
wxNODISCARD static T* Clone(const T& value) { return new T{value}; }
static void Free(T* p) { delete p; }
};
@@ -694,7 +694,7 @@ private:
classdecl wxObjectArrayTraitsFor##name \
{ \
public: \
static T* Clone(T const& item); \
wxNODISCARD static T* Clone(T const& item); \
static void Free(T* p); \
}; \
typedef wxBaseObjectArray<T, wxObjectArrayTraitsFor##name> \
+53 -53
View File
@@ -1002,7 +1002,7 @@ public:
// This function is used to create a copy of the event polymorphically and
// all derived classes must implement it because otherwise wxPostEvent()
// for them wouldn't work (it needs to do a copy of the event)
virtual wxEvent *Clone() const = 0;
wxNODISCARD virtual wxEvent *Clone() const = 0;
// this function is used to selectively process events in wxEventLoopBase::YieldFor
// NOTE: by default it returns wxEVT_CATEGORY_UI just because the major
@@ -1339,7 +1339,7 @@ public:
void RequestMore(bool needMore = true) { m_requestMore = needMore; }
bool MoreRequested() const { return m_requestMore; }
virtual wxEvent *Clone() const override { return new wxIdleEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxIdleEvent(*this); }
// Specify how wxWidgets will send idle events: to
// all windows, or only to those which specify that they
@@ -1377,7 +1377,7 @@ public:
SetString(GetString().Clone());
}
virtual wxEvent *Clone() const override
wxNODISCARD virtual wxEvent *Clone() const override
{
return new wxThreadEvent(*this);
}
@@ -1439,7 +1439,7 @@ public:
{
}
virtual wxEvent *Clone() const override
wxNODISCARD virtual wxEvent *Clone() const override
{
return new wxAsyncMethodCallEvent0(*this);
}
@@ -1481,7 +1481,7 @@ public:
{
}
virtual wxEvent *Clone() const override
wxNODISCARD virtual wxEvent *Clone() const override
{
return new wxAsyncMethodCallEvent1(*this);
}
@@ -1528,7 +1528,7 @@ public:
{
}
virtual wxEvent *Clone() const override
wxNODISCARD virtual wxEvent *Clone() const override
{
return new wxAsyncMethodCallEvent2(*this);
}
@@ -1564,7 +1564,7 @@ public:
{
}
virtual wxEvent *Clone() const override
wxNODISCARD virtual wxEvent *Clone() const override
{
return new wxAsyncMethodCallEventFunctor(*this);
}
@@ -1648,7 +1648,7 @@ public:
// true if the listbox event was a selection.
bool IsSelection() const { return (m_extraLong != 0); }
virtual wxEvent *Clone() const override { return new wxCommandEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxCommandEvent(*this); }
virtual wxEventCategory GetEventCategory() const override { return wxEVT_CATEGORY_USER_INPUT; }
protected:
@@ -1682,7 +1682,7 @@ public:
// for implementation code only: is the operation allowed?
bool IsAllowed() const { return m_bAllow; }
virtual wxEvent *Clone() const override { return new wxNotifyEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxNotifyEvent(*this); }
private:
bool m_bAllow;
@@ -1717,7 +1717,7 @@ public:
void SetOrientation(int orient) { m_extraLong = (long) orient; }
void SetPosition(int pos) { m_commandInt = pos; }
virtual wxEvent *Clone() const override { return new wxScrollEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxScrollEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxScrollEvent);
@@ -1750,7 +1750,7 @@ public:
void SetOrientation(int orient) { m_extraLong = (long) orient; }
void SetPosition(int pos) { m_commandInt = pos; }
virtual wxEvent *Clone() const override { return new wxScrollWinEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxScrollWinEvent(*this); }
protected:
int m_commandInt;
@@ -1898,7 +1898,7 @@ public:
bool IsSynthesized() const { return m_synthesized; }
float GetMagnification() const { return m_magnification; }
virtual wxEvent *Clone() const override { return new wxMouseEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxMouseEvent(*this); }
virtual wxEventCategory GetEventCategory() const override { return wxEVT_CATEGORY_USER_INPUT; }
wxMouseEvent& operator=(const wxMouseEvent& event)
@@ -1955,7 +1955,7 @@ public:
const wxCursor& GetCursor() const { return m_cursor; }
bool HasCursor() const { return m_cursor.IsOk(); }
virtual wxEvent *Clone() const override { return new wxSetCursorEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxSetCursorEvent(*this); }
private:
wxCoord m_x, m_y;
@@ -1990,7 +1990,7 @@ public:
const wxTouchSequenceId& GetSequenceId() const { return m_sequence; }
void SetSequenceId(const wxTouchSequenceId& sequence) { m_sequence = sequence; }
virtual wxEvent *Clone() const override { return new wxMultiTouchEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxMultiTouchEvent(*this); }
protected:
wxPoint2DDouble m_pos;
@@ -2029,7 +2029,7 @@ public:
bool IsGestureEnd() const { return m_isEnd; }
void SetGestureEnd(bool isEnd = true) { m_isEnd = isEnd; }
virtual wxEvent *Clone() const override { return new wxGestureEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxGestureEvent(*this); }
protected:
wxPoint m_pos;
@@ -2062,7 +2062,7 @@ public:
wxPoint GetDelta() const { return m_delta; }
void SetDelta(const wxPoint& delta) { m_delta = delta; }
virtual wxEvent *Clone() const override { return new wxPanGestureEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxPanGestureEvent(*this); }
private:
wxPoint m_delta;
@@ -2091,7 +2091,7 @@ public:
double GetZoomFactor() const { return m_zoomFactor; }
void SetZoomFactor(double zoomFactor) { m_zoomFactor = zoomFactor; }
virtual wxEvent *Clone() const override { return new wxZoomGestureEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxZoomGestureEvent(*this); }
private:
double m_zoomFactor;
@@ -2120,7 +2120,7 @@ public:
double GetRotationAngle() const { return m_rotationAngle; }
void SetRotationAngle(double rotationAngle) { m_rotationAngle = rotationAngle; }
virtual wxEvent *Clone() const override { return new wxRotateGestureEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxRotateGestureEvent(*this); }
private:
double m_rotationAngle;
@@ -2144,7 +2144,7 @@ public:
wxTwoFingerTapEvent(const wxTwoFingerTapEvent& event) : wxGestureEvent(event)
{ }
virtual wxEvent *Clone() const override { return new wxTwoFingerTapEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxTwoFingerTapEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTwoFingerTapEvent);
@@ -2166,7 +2166,7 @@ public:
wxLongPressEvent(const wxLongPressEvent& event) : wxGestureEvent(event)
{ }
virtual wxEvent *Clone() const override { return new wxLongPressEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxLongPressEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxLongPressEvent);
};
@@ -2187,7 +2187,7 @@ public:
wxPressAndTapEvent(const wxPressAndTapEvent& event) : wxGestureEvent(event)
{ }
virtual wxEvent *Clone() const override { return new wxPressAndTapEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxPressAndTapEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPressAndTapEvent);
};
@@ -2295,7 +2295,7 @@ public:
bool IsNextEventAllowed() const { return m_allowNext; }
virtual wxEvent *Clone() const override { return new wxKeyEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxKeyEvent(*this); }
virtual wxEventCategory GetEventCategory() const override { return wxEVT_CATEGORY_USER_INPUT; }
// we do need to copy wxKeyEvent sometimes (in wxTreeCtrl code, for
@@ -2389,7 +2389,7 @@ public:
wxRect GetRect() const { return m_rect; }
void SetRect(const wxRect& rect) { m_rect = rect; }
virtual wxEvent *Clone() const override { return new wxSizeEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxSizeEvent(*this); }
public:
// For internal usage only. Will be converted to protected members.
@@ -2429,7 +2429,7 @@ public:
wxRect GetRect() const { return m_rect; }
void SetRect(const wxRect& rect) { m_rect = rect; }
virtual wxEvent *Clone() const override { return new wxMoveEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxMoveEvent(*this); }
protected:
wxPoint m_pos;
@@ -2457,7 +2457,7 @@ public:
public:
// default copy ctor and dtor are fine
virtual wxEvent *Clone() const override { return new wxPaintEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxPaintEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxPaintEvent);
@@ -2473,7 +2473,7 @@ public:
explicit wxNcPaintEvent(wxWindowBase* window = nullptr);
public:
virtual wxEvent *Clone() const override { return new wxNcPaintEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxNcPaintEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxNcPaintEvent);
@@ -2499,7 +2499,7 @@ public:
wxDC *GetDC() const { return m_dc; }
virtual wxEvent *Clone() const override { return new wxEraseEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxEraseEvent(*this); }
protected:
wxDC *m_dc;
@@ -2531,7 +2531,7 @@ public:
wxWindow *GetWindow() const { return m_win; }
void SetWindow(wxWindow *win) { m_win = win; }
virtual wxEvent *Clone() const override { return new wxFocusEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxFocusEvent(*this); }
private:
wxWindow *m_win;
@@ -2549,7 +2549,7 @@ public:
wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); }
virtual wxEvent *Clone() const override { return new wxChildFocusEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxChildFocusEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxChildFocusEvent);
@@ -2590,7 +2590,7 @@ public:
bool GetActive() const { return m_active; }
Reason GetActivationReason() const { return m_activationReason;}
virtual wxEvent *Clone() const override { return new wxActivateEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxActivateEvent(*this); }
private:
bool m_active;
@@ -2612,7 +2612,7 @@ public:
: wxEvent(Id, wxEVT_INIT_DIALOG)
{ }
virtual wxEvent *Clone() const override { return new wxInitDialogEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxInitDialogEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxInitDialogEvent);
@@ -2646,7 +2646,7 @@ public:
wxMenuItem* GetMenuItem() const { return m_menuItem; }
virtual wxEvent *Clone() const override { return new wxMenuEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxMenuEvent(*this); }
private:
int m_menuId;
@@ -2701,7 +2701,7 @@ public:
bool CanVeto() const { return m_canVeto; }
bool GetVeto() const { return m_canVeto && m_veto; }
virtual wxEvent *Clone() const override { return new wxCloseEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxCloseEvent(*this); }
protected:
bool m_loggingOff,
@@ -2731,7 +2731,7 @@ public:
// return true if the window was shown, false if hidden
bool IsShown() const { return m_show; }
virtual wxEvent *Clone() const override { return new wxShowEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxShowEvent(*this); }
protected:
bool m_show;
@@ -2757,7 +2757,7 @@ public:
// return true if the frame was iconized, false if restored
bool IsIconized() const { return m_iconized; }
virtual wxEvent *Clone() const override { return new wxIconizeEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxIconizeEvent(*this); }
protected:
bool m_iconized;
@@ -2776,7 +2776,7 @@ public:
: wxEvent(winid, wxEVT_MAXIMIZE)
{ }
virtual wxEvent *Clone() const override { return new wxMaximizeEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxMaximizeEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxMaximizeEvent);
@@ -2797,7 +2797,7 @@ public:
bool IsFullScreen() const { return m_fullscreen; }
virtual wxEvent *Clone() const override { return new wxFullScreenEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxFullScreenEvent(*this); }
protected:
bool m_fullscreen;
@@ -2900,7 +2900,7 @@ public:
{ return (((but == wxJOY_BUTTON_ANY) && (m_buttonState != 0)) ||
((m_buttonState & but) == but)); }
virtual wxEvent *Clone() const override { return new wxJoystickEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxJoystickEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxJoystickEvent);
@@ -2950,7 +2950,7 @@ public:
int GetNumberOfFiles() const { return m_noFiles; }
wxString *GetFiles() const { return m_files; }
virtual wxEvent *Clone() const override { return new wxDropFilesEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxDropFilesEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDropFilesEvent);
@@ -3050,7 +3050,7 @@ public:
// Returns the UI update mode
static wxUpdateUIMode GetMode() { return sm_updateMode; }
virtual wxEvent *Clone() const override { return new wxUpdateUIEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxUpdateUIEvent(*this); }
protected:
wxCheckBoxState m_3checked;
@@ -3083,7 +3083,7 @@ public:
: wxEvent(0, wxEVT_SYS_COLOUR_CHANGED)
{ }
virtual wxEvent *Clone() const override { return new wxSysColourChangedEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxSysColourChangedEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxSysColourChangedEvent);
@@ -3108,7 +3108,7 @@ public:
m_gainedCapture(event.m_gainedCapture)
{ }
virtual wxEvent *Clone() const override { return new wxMouseCaptureChangedEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxMouseCaptureChangedEvent(*this); }
wxWindow* GetCapturedWindow() const { return m_gainedCapture; }
@@ -3136,7 +3136,7 @@ public:
: wxEvent(event)
{}
virtual wxEvent *Clone() const override { return new wxMouseCaptureLostEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxMouseCaptureLostEvent(*this); }
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMouseCaptureLostEvent);
};
@@ -3151,7 +3151,7 @@ public:
: wxEvent(0, wxEVT_DISPLAY_CHANGED)
{ }
virtual wxEvent *Clone() const override { return new wxDisplayChangedEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxDisplayChangedEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxDisplayChangedEvent);
@@ -3186,7 +3186,7 @@ public:
int ScaleX(int x) const { return Scale(wxSize(x, -1)).x; }
int ScaleY(int y) const { return Scale(wxSize(-1, y)).y; }
virtual wxEvent *Clone() const override { return new wxDPIChangedEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxDPIChangedEvent(*this); }
private:
wxSize m_oldDPI;
@@ -3215,7 +3215,7 @@ public:
void SetChangedWindow(wxWindow* win) { m_changedWindow = win; }
wxWindow* GetChangedWindow() const { return m_changedWindow; }
virtual wxEvent *Clone() const override { return new wxPaletteChangedEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxPaletteChangedEvent(*this); }
protected:
wxWindow* m_changedWindow;
@@ -3245,7 +3245,7 @@ public:
void SetPaletteRealized(bool realized) { m_paletteRealized = realized; }
bool GetPaletteRealized() const { return m_paletteRealized; }
virtual wxEvent *Clone() const override { return new wxQueryNewPaletteEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxQueryNewPaletteEvent(*this); }
protected:
bool m_paletteRealized;
@@ -3304,7 +3304,7 @@ public:
// Set flags
void SetFlags(long flags) { m_flags = flags; }
virtual wxEvent *Clone() const override { return new wxNavigationKeyEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxNavigationKeyEvent(*this); }
enum wxNavigationKeyEventFlags
{
@@ -3338,7 +3338,7 @@ public:
wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); }
virtual wxEvent *Clone() const override { return new wxWindowCreateEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxWindowCreateEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxWindowCreateEvent);
@@ -3351,7 +3351,7 @@ public:
wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); }
virtual wxEvent *Clone() const override { return new wxWindowDestroyEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxWindowDestroyEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY(wxWindowDestroyEvent);
@@ -3402,7 +3402,7 @@ public:
const wxString& GetTarget() const { return m_target; }
void SetTarget(const wxString& target) { m_target = target; }
virtual wxEvent *Clone() const override { return new wxHelpEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxHelpEvent(*this); }
// optional indication of the event source
Origin GetOrigin() const { return m_origin; }
@@ -3444,7 +3444,7 @@ public:
: wxCommandEvent(event)
{ }
virtual wxEvent *Clone() const override { return new wxClipboardTextEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxClipboardTextEvent(*this); }
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxClipboardTextEvent);
@@ -3476,7 +3476,7 @@ public:
const wxPoint& GetPosition() const { return m_pos; }
void SetPosition(const wxPoint& pos) { m_pos = pos; }
virtual wxEvent *Clone() const override { return new wxContextMenuEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxContextMenuEvent(*this); }
protected:
wxPoint m_pos;
+1 -1
View File
@@ -155,7 +155,7 @@ public:
void SetFindString(const wxString& str) { SetString(str); }
void SetReplaceString(const wxString& str) { m_strReplace = str; }
virtual wxEvent *Clone() const override { return new wxFindDialogEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxFindDialogEvent(*this); }
private:
wxString m_strReplace;
+1 -1
View File
@@ -97,7 +97,7 @@ public:
}
// no need for the copy constructor as the default one will be fine.
virtual wxEvent *Clone() const override { return new wxFileCtrlEvent( *this ); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxFileCtrlEvent( *this ); }
void SetFiles( const wxArrayString &files ) { m_files = files; }
void SetDirectory( const wxString &directory ) { m_directory = directory; }
+1 -1
View File
@@ -49,7 +49,7 @@ public:
void SetPath(const wxString &p) { m_path = p; }
// default copy ctor, assignment operator and dtor are ok
virtual wxEvent *Clone() const override { return new wxFileDirPickerEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxFileDirPickerEvent(*this); }
private:
wxString m_path;
+1 -1
View File
@@ -212,7 +212,7 @@ public:
void SetFont(const wxFont &c) { m_font = c; }
// default copy ctor, assignment operator and dtor are ok
virtual wxEvent *Clone() const override { return new wxFontPickerEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxFontPickerEvent(*this); }
private:
wxFont m_font;
+1 -1
View File
@@ -160,7 +160,7 @@ public:
return m_changeType;
}
virtual wxEvent* Clone() const override
wxNODISCARD virtual wxEvent* Clone() const override
{
wxFileSystemWatcherEvent* evt = new wxFileSystemWatcherEvent(*this);
evt->m_errorMsg = m_errorMsg.Clone();
+2 -2
View File
@@ -77,13 +77,13 @@ protected:
return CreateGDIRefData();
}
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const override
wxNODISCARD virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const override
{
return CloneGDIRefData(static_cast<const wxGDIRefData *>(data));
}
virtual wxGDIRefData *CreateGDIRefData() const = 0;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const = 0;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const = 0;
wxDECLARE_DYNAMIC_CLASS(wxGDIObject);
};
+1 -1
View File
@@ -38,7 +38,7 @@ public:
protected:
// ref counting code
virtual wxObjectRefData *CreateRefData() const override;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const override;
wxNODISCARD virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const override;
private:
wxDECLARE_DYNAMIC_CLASS(wxAcceleratorTable);
+7 -7
View File
@@ -247,7 +247,7 @@ public:
}
// create a new object which is the copy of this one
virtual wxGridCellRenderer *Clone() const = 0;
wxNODISCARD virtual wxGridCellRenderer *Clone() const = 0;
// These functions still exist for compatibility and are the ones actually
@@ -504,7 +504,7 @@ public:
virtual void Destroy();
// create a new object which is the copy of this one
virtual wxGridCellEditor *Clone() const = 0;
wxNODISCARD virtual wxGridCellEditor *Clone() const = 0;
// added GetValue so we can get the value which is in the control
virtual wxString GetValue() const = 0;
@@ -821,7 +821,7 @@ public:
}
// creates a new copy of this object
wxGridCellAttr *Clone() const;
wxNODISCARD wxGridCellAttr *Clone() const;
void MergeWith(wxGridCellAttr *mergefrom);
// setters
@@ -3294,7 +3294,7 @@ public:
wxPoint GetPosition() const { return wxPoint( m_x, m_y ); }
bool Selecting() const { return m_selecting; }
virtual wxEvent *Clone() const override { return new wxGridEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxGridEvent(*this); }
protected:
int m_row;
@@ -3354,7 +3354,7 @@ public:
int GetRowOrCol() const { return m_rowOrCol; }
wxPoint GetPosition() const { return wxPoint( m_x, m_y ); }
virtual wxEvent *Clone() const override { return new wxGridSizeEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxGridSizeEvent(*this); }
protected:
int m_rowOrCol;
@@ -3418,7 +3418,7 @@ public:
int GetRightCol() const { return m_bottomRight.GetCol(); }
bool Selecting() const { return m_selecting; }
virtual wxEvent *Clone() const override { return new wxGridRangeSelectEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxGridRangeSelectEvent(*this); }
protected:
void Init(const wxGridCellCoords& topLeft,
@@ -3464,7 +3464,7 @@ public:
wxControl* GetControl() { return wxDynamicCast(m_window, wxControl); }
void SetControl(wxControl* ctrl) { m_window = ctrl; }
virtual wxEvent *Clone() const override { return new wxGridEditorCreatedEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxGridEditorCreatedEvent(*this); }
private:
int m_row;
+9 -9
View File
@@ -46,7 +46,7 @@ public:
wxDC& dc,
int row, int col) override;
virtual wxGridCellRenderer *Clone() const override
wxNODISCARD virtual wxGridCellRenderer *Clone() const override
{ return new wxGridCellStringRenderer(*this); }
protected:
@@ -95,7 +95,7 @@ public:
// Optional parameters for this renderer are "<min>,<max>".
virtual void SetParameters(const wxString& params) override;
virtual wxGridCellRenderer *Clone() const override
wxNODISCARD virtual wxGridCellRenderer *Clone() const override
{ return new wxGridCellNumberRenderer(*this); }
protected:
@@ -146,7 +146,7 @@ public:
// with format being one of f|e|g|E|F|G
virtual void SetParameters(const wxString& params) override;
virtual wxGridCellRenderer *Clone() const override
wxNODISCARD virtual wxGridCellRenderer *Clone() const override
{ return new wxGridCellFloatRenderer(*this); }
protected:
@@ -193,7 +193,7 @@ public:
wxGridCellAttr& attr,
wxDC& dc) override;
virtual wxGridCellRenderer *Clone() const override
wxNODISCARD virtual wxGridCellRenderer *Clone() const override
{ return new wxGridCellBoolRenderer(*this); }
};
@@ -234,7 +234,7 @@ public:
wxGridCellAttr& attr,
wxDC& dc) override;
virtual wxGridCellRenderer *Clone() const override
wxNODISCARD virtual wxGridCellRenderer *Clone() const override
{ return new wxGridCellDateRenderer(*this); }
// output strptime()-like format string
@@ -265,7 +265,7 @@ public:
{
}
virtual wxGridCellRenderer *Clone() const override
wxNODISCARD virtual wxGridCellRenderer *Clone() const override
{ return new wxGridCellDateTimeRenderer(*this); }
protected:
@@ -293,7 +293,7 @@ public:
// Parameters string is a comma-separated list of values.
virtual void SetParameters(const wxString& params) override;
virtual wxGridCellRenderer *Clone() const override
wxNODISCARD virtual wxGridCellRenderer *Clone() const override
{
return new wxGridCellChoiceRenderer(*this);
}
@@ -331,7 +331,7 @@ public:
wxDC& dc,
int row, int col) override;
virtual wxGridCellRenderer *Clone() const override
wxNODISCARD virtual wxGridCellRenderer *Clone() const override
{ return new wxGridCellEnumRenderer(*this); }
protected:
@@ -376,7 +376,7 @@ public:
int row, int col,
int height) override;
virtual wxGridCellRenderer *Clone() const override
wxNODISCARD virtual wxGridCellRenderer *Clone() const override
{ return new wxGridCellAutoWrapStringRenderer(*this); }
private:
+8 -8
View File
@@ -86,7 +86,7 @@ public:
virtual void SetValidator(const wxValidator& validator);
#endif
virtual wxGridCellEditor *Clone() const override
wxNODISCARD virtual wxGridCellEditor *Clone() const override
{ return new wxGridCellTextEditor(*this); }
// added GetValue so we can get the value which is in the control
@@ -149,7 +149,7 @@ public:
// parameters string format is "min,max"
virtual void SetParameters(const wxString& params) override;
virtual wxGridCellEditor *Clone() const override
wxNODISCARD virtual wxGridCellEditor *Clone() const override
{ return new wxGridCellNumberEditor(*this); }
// added GetValue so we can get the value which is in the control
@@ -244,7 +244,7 @@ public:
virtual void Reset() override;
virtual void StartingKey(wxKeyEvent& event) override;
virtual wxGridCellEditor *Clone() const override
wxNODISCARD virtual wxGridCellEditor *Clone() const override
{ return new wxGridCellFloatEditor(*this); }
// parameters string format is "width[,precision[,format]]"
@@ -306,7 +306,7 @@ public:
virtual void StartingClick() override;
virtual void StartingKey(wxKeyEvent& event) override;
virtual wxGridCellEditor *Clone() const override
wxNODISCARD virtual wxGridCellEditor *Clone() const override
{ return new wxGridCellBoolEditor(*this); }
// added GetValue so we can get the value which is in the control, see
@@ -384,7 +384,7 @@ public:
// parameters string format is "item1[,item2[...,itemN]]"
virtual void SetParameters(const wxString& params) override;
virtual wxGridCellEditor *Clone() const override
wxNODISCARD virtual wxGridCellEditor *Clone() const override
{ return new wxGridCellChoiceEditor(*this); }
// added GetValue so we can get the value which is in the control
@@ -417,7 +417,7 @@ public:
virtual ~wxGridCellEnumEditor() = default;
virtual wxGridCellEditor* Clone() const override
wxNODISCARD virtual wxGridCellEditor* Clone() const override
{ return new wxGridCellEnumEditor(*this); }
virtual void BeginEdit(int row, int col, wxGrid* grid) override;
@@ -448,7 +448,7 @@ public:
wxWindowID id,
wxEvtHandler* evtHandler) override;
virtual wxGridCellEditor *Clone() const override
wxNODISCARD virtual wxGridCellEditor *Clone() const override
{ return new wxGridCellAutoWrapStringEditor(*this); }
};
@@ -481,7 +481,7 @@ public:
virtual void Reset() override;
virtual wxGridCellEditor *Clone() const override
wxNODISCARD virtual wxGridCellEditor *Clone() const override
{ return new wxGridCellDateEditor(*this); }
virtual wxString GetValue() const override;
+2 -2
View File
@@ -88,7 +88,7 @@ public:
void SetAlignment(wxLayoutAlignment align) { m_alignment = align; }
wxLayoutAlignment GetAlignment() const { return m_alignment; }
virtual wxEvent *Clone() const override { return new wxQueryLayoutInfoEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxQueryLayoutInfoEvent(*this); }
protected:
int m_flags;
@@ -131,7 +131,7 @@ public:
void SetRect(const wxRect& rect) { m_rect = rect; }
wxRect GetRect() const { return m_rect; }
virtual wxEvent *Clone() const override { return new wxCalculateLayoutEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxCalculateLayoutEvent(*this); }
protected:
int m_flags;
+1 -1
View File
@@ -40,7 +40,7 @@ public:
protected:
virtual wxGDIRefData *CreateGDIRefData() const override;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const override;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const override;
private:
wxDECLARE_DYNAMIC_CLASS(wxPalette);
+1 -1
View File
@@ -28,7 +28,7 @@ public:
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
// wxRegionBase pure virtuals
virtual bool DoIsEqual(const wxRegion& region) const;
+1 -1
View File
@@ -225,7 +225,7 @@ public:
void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; }
wxSashDragStatus GetDragStatus() const { return m_dragStatus; }
virtual wxEvent *Clone() const override { return new wxSashEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxSashEvent(*this); }
private:
wxSashEdgePosition m_edge;
+1 -1
View File
@@ -406,7 +406,7 @@ public:
return m_data.pt.y;
}
virtual wxEvent *Clone() const override { return new wxSplitterEvent(*this); }
wxNODISCARD virtual wxEvent *Clone() const override { return new wxSplitterEvent(*this); }
private:
friend class WXDLLIMPEXP_FWD_CORE wxSplitterWindow;
+1 -1
View File
@@ -80,7 +80,7 @@ public:
bool ConvertToImage(unsigned int frame, wxImage *image) const override;
wxAnimationDecoder *Clone() const override
wxNODISCARD wxAnimationDecoder *Clone() const override
{ return new wxGIFDecoder; }
wxAnimationType GetType() const override
{ return wxANIMATION_TYPE_GIF; }
+1 -1
View File
@@ -136,7 +136,7 @@ public:
wxGraphicsObjectRefData* GetGraphicsData() const;
protected:
virtual wxObjectRefData* CreateRefData() const override;
virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const override;
wxNODISCARD virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const override;
wxDECLARE_DYNAMIC_CLASS(wxGraphicsObject);
};
+1 -1
View File
@@ -155,7 +155,7 @@ protected:
#endif // wxUSE_IMAGE
virtual wxGDIRefData* CreateGDIRefData() const override;
virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const override;
wxNODISCARD virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const override;
#ifdef __WXGTK3__
virtual bool DoCreate(const wxSize& sz, double scale, int depth) override;
+1 -1
View File
@@ -44,7 +44,7 @@ public:
protected:
virtual wxGDIRefData *CreateGDIRefData() const override;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const override;
wxNODISCARD virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const override;
wxDECLARE_DYNAMIC_CLASS(wxBrush);
};

Some files were not shown because too many files have changed in this diff Show More