mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #3487
Diadlo (1): style(toxcall): Copy constructor return non-const reference
This commit is contained in:
commit
88eca7e200
|
@ -40,7 +40,7 @@ ToxCall::~ToxCall()
|
||||||
audio.unsubscribeOutput(alSource);
|
audio.unsubscribeOutput(alSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ToxCall& ToxCall::operator=(ToxCall&& other) noexcept
|
ToxCall& ToxCall::operator=(ToxCall&& other) noexcept
|
||||||
{
|
{
|
||||||
audioInConn = other.audioInConn;
|
audioInConn = other.audioInConn;
|
||||||
other.audioInConn = QMetaObject::Connection();
|
other.audioInConn = QMetaObject::Connection();
|
||||||
|
@ -141,7 +141,7 @@ ToxFriendCall::~ToxFriendCall()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const ToxFriendCall& ToxFriendCall::operator=(ToxFriendCall&& other) noexcept
|
ToxFriendCall& ToxFriendCall::operator=(ToxFriendCall&& other) noexcept
|
||||||
{
|
{
|
||||||
ToxCall::operator =(move(other));
|
ToxCall::operator =(move(other));
|
||||||
videoEnabled = other.videoEnabled;
|
videoEnabled = other.videoEnabled;
|
||||||
|
@ -175,7 +175,7 @@ ToxGroupCall::ToxGroupCall(ToxGroupCall&& other) noexcept
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const ToxGroupCall &ToxGroupCall::operator=(ToxGroupCall &&other) noexcept
|
ToxGroupCall &ToxGroupCall::operator=(ToxGroupCall &&other) noexcept
|
||||||
{
|
{
|
||||||
ToxCall::operator =(move(other));
|
ToxCall::operator =(move(other));
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ public:
|
||||||
ToxCall(ToxCall&& other) noexcept;
|
ToxCall(ToxCall&& other) noexcept;
|
||||||
|
|
||||||
inline operator int() {return callId;}
|
inline operator int() {return callId;}
|
||||||
const ToxCall& operator=(const ToxCall& other) = delete;
|
ToxCall& operator=(const ToxCall& other) = delete;
|
||||||
const ToxCall& operator=(ToxCall&& other) noexcept;
|
ToxCall& operator=(ToxCall&& other) noexcept;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QMetaObject::Connection audioInConn;
|
QMetaObject::Connection audioInConn;
|
||||||
|
@ -46,7 +46,7 @@ struct ToxFriendCall : public ToxCall
|
||||||
ToxFriendCall(ToxFriendCall&& other) noexcept;
|
ToxFriendCall(ToxFriendCall&& other) noexcept;
|
||||||
~ToxFriendCall();
|
~ToxFriendCall();
|
||||||
|
|
||||||
const ToxFriendCall& operator=(ToxFriendCall&& other) noexcept;
|
ToxFriendCall& operator=(ToxFriendCall&& other) noexcept;
|
||||||
|
|
||||||
bool videoEnabled; ///< True if our user asked for a video call, sending and recving
|
bool videoEnabled; ///< True if our user asked for a video call, sending and recving
|
||||||
bool nullVideoBitrate; ///< True if our video bitrate is zero, i.e. if the device is closed
|
bool nullVideoBitrate; ///< True if our video bitrate is zero, i.e. if the device is closed
|
||||||
|
@ -70,7 +70,7 @@ struct ToxGroupCall : public ToxCall
|
||||||
ToxGroupCall(int GroupNum, CoreAV& av);
|
ToxGroupCall(int GroupNum, CoreAV& av);
|
||||||
ToxGroupCall(ToxGroupCall&& other) noexcept;
|
ToxGroupCall(ToxGroupCall&& other) noexcept;
|
||||||
|
|
||||||
const ToxGroupCall& operator=(ToxGroupCall&& other) noexcept;
|
ToxGroupCall& operator=(ToxGroupCall&& other) noexcept;
|
||||||
|
|
||||||
// If you add something here, don't forget to override the ctors and move operators!
|
// If you add something here, don't forget to override the ctors and move operators!
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user