Make parent the first arg in PlayingCard constructor

This commit is contained in:
ItsDrike 2024-12-06 04:33:29 +01:00
parent 03e74a6c67
commit 206ff25a1a
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
#include "playingcard.h"
PlayingCard::PlayingCard(const PlayingCard::Suit& suit, const PlayingCard::Value& value, QObject* parent) : QObject{parent}, m_suit{suit}, m_value{value} {}
PlayingCard::PlayingCard(QObject* parent, const PlayingCard::Suit& suit, const PlayingCard::Value& value) : QObject{parent}, m_suit{suit}, m_value{value} {}
PlayingCard::Suit PlayingCard::suit() const {
return m_suit;

View file

@ -42,7 +42,7 @@ class PlayingCard : public QObject {
Spades,
};
explicit PlayingCard(const Suit& suit = Suit::Clubs, const Value& value = Value::Ace, QObject* parent = nullptr);
explicit PlayingCard(QObject* parent = nullptr, const Suit& suit = Suit::Clubs, const Value& value = Value::Ace);
Suit suit() const;
QString suitString() const;