Mark missing ctors deleted

- Satisfy the rule of five

Signed-off-by: Veli-Matti Visuri <veli-matti.visuri@cerescon.fi> (github: visuve)
This commit is contained in:
visuve 2017-09-17 14:28:20 +03:00 committed by John Preston
parent 8c92f42de3
commit 08e3a54a58
2 changed files with 8 additions and 0 deletions

View File

@ -26,10 +26,14 @@ namespace qthelp {
class RegularExpressionMatch {
public:
RegularExpressionMatch(const QRegularExpressionMatch &other) = delete;
RegularExpressionMatch(const RegularExpressionMatch &other) = delete;
RegularExpressionMatch(QRegularExpressionMatch &&match) : data_(std::move(match)) {
}
RegularExpressionMatch(RegularExpressionMatch &&other) : data_(std::move(other.data_)) {
}
RegularExpressionMatch &operator=(const QRegularExpressionMatch &match) = delete;
RegularExpressionMatch &operator=(const RegularExpressionMatch &other) = delete;
RegularExpressionMatch &operator=(QRegularExpressionMatch &&match) {
data_ = std::move(match);
return *this;

View File

@ -146,6 +146,10 @@ struct HistoryMessageForwarded : public RuntimeComponent<HistoryMessageForwarded
};
struct HistoryMessageReply : public RuntimeComponent<HistoryMessageReply> {
HistoryMessageReply() = default;
HistoryMessageReply(const HistoryMessageReply &other) = delete;
HistoryMessageReply(HistoryMessageReply &&other) = delete;
HistoryMessageReply &operator=(const HistoryMessageReply &other) = delete;
HistoryMessageReply &operator=(HistoryMessageReply &&other) {
replyToMsgId = other.replyToMsgId;
std::swap(replyToMsg, other.replyToMsg);