Skip to content

Commit

Permalink
fix some deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Oct 29, 2023
1 parent f8bb9ba commit 5ff861c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions vstgui/lib/cdrawdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ struct CDrawMode
{
public:
constexpr CDrawMode (uint32_t mode = kAliasing) : mode (mode) {}
constexpr CDrawMode (const CDrawMode& m) : mode (m.mode) {}

constexpr CDrawMode (const CDrawMode& m) = default;
constexpr CDrawMode& operator= (const CDrawMode& m) = default;
constexpr uint32_t modeIgnoringIntegralMode () const { return (mode & ~kNonIntegralMode); }

constexpr bool integralMode () const { return !hasBit (mode, kNonIntegralMode); }
Expand Down
4 changes: 2 additions & 2 deletions vstgui/lib/controls/cbuttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ class CTextButton : public CControl
CMouseEventResult onMouseMoved (CPoint& where, const CButtonState& buttons) override;
CMouseEventResult onMouseCancel () override;
void onKeyboardEvent (KeyboardEvent& event) override;
CLASS_METHODS(CTextButton, CControl)

CLASS_METHODS_NOCOPY (CTextButton, CControl)
protected:
~CTextButton () noexcept override = default;

Expand Down
3 changes: 2 additions & 1 deletion vstgui/lib/cresourcedescription.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ class CResourceDescription
CResourceDescription () = default;
CResourceDescription (UTF8StringPtr name) : type (kStringType) { u.name = name; }
explicit CResourceDescription (int32_t id) : type (kIntegerType) { u.id = id; }
CResourceDescription (const CResourceDescription&) = default;

CResourceDescription& operator= (int32_t id) { u.id = id; type = kIntegerType; return *this; }
CResourceDescription& operator= (const CResourceDescription& desc) { type = desc.type; u.id = desc.u.id; u.name = desc.u.name; return *this; }
CResourceDescription& operator= (const CResourceDescription& desc) = default;

int32_t type {kUnknownType};
union {
Expand Down
2 changes: 2 additions & 0 deletions vstgui/lib/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ struct Modifiers
Modifiers () = default;
Modifiers (const Modifiers&) = default;
explicit Modifiers (ModifierKey modifier) : data (cast (modifier)) {}
Modifiers& operator= (const Modifiers&) = default;

/** test if no modifier key is set */
[[nodiscard]] bool empty () const { return data == 0; }
Expand Down Expand Up @@ -202,6 +203,7 @@ struct MouseEventButtonState
MouseEventButtonState () = default;
MouseEventButtonState (const MouseEventButtonState&) = default;
MouseEventButtonState (MouseButton pos) { set (pos); }
MouseEventButtonState& operator= (const MouseEventButtonState&) = default;

[[nodiscard]] bool operator== (const MouseEventButtonState& other) const
{
Expand Down

0 comments on commit 5ff861c

Please sign in to comment.