mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-25 23:13:11 +02:00
Change const T&&
parameters to T&&
to enable proper move semantics
Previously some constructors/functions used `const T&&`, which prevents calling the move constructor. This commit removes the `const` qualifier so that `std::move` actually performs a move.
This commit is contained in:
parent
e6ebc19b4f
commit
5a6a5fd4d1
6 changed files with 6 additions and 6 deletions
|
@ -789,7 +789,7 @@ void Stickers::somethingReceived(
|
|||
void Stickers::setPackAndEmoji(
|
||||
StickersSet &set,
|
||||
StickersPack &&pack,
|
||||
const std::vector<TimeId> &&dates,
|
||||
std::vector<TimeId> &&dates,
|
||||
const QVector<MTPStickerPack> &packs) {
|
||||
set.stickers = std::move(pack);
|
||||
set.dates = std::move(dates);
|
||||
|
|
|
@ -291,7 +291,7 @@ private:
|
|||
void setPackAndEmoji(
|
||||
StickersSet &set,
|
||||
StickersPack &&pack,
|
||||
const std::vector<TimeId> &&dates,
|
||||
std::vector<TimeId> &&dates,
|
||||
const QVector<MTPStickerPack> &packs);
|
||||
void somethingReceived(
|
||||
const QVector<MTPStickerSet> &list,
|
||||
|
|
|
@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace Editor {
|
||||
|
||||
ItemImage::ItemImage(
|
||||
const QPixmap &&pixmap,
|
||||
QPixmap &&pixmap,
|
||||
ItemBase::Data data)
|
||||
: ItemBase(std::move(data))
|
||||
, _pixmap(std::move(pixmap)) {
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Editor {
|
|||
class ItemImage : public ItemBase {
|
||||
public:
|
||||
ItemImage(
|
||||
const QPixmap &&pixmap,
|
||||
QPixmap &&pixmap,
|
||||
ItemBase::Data data);
|
||||
void paint(
|
||||
QPainter *p,
|
||||
|
|
|
@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
namespace Editor {
|
||||
|
||||
ItemLine::ItemLine(const QPixmap &&pixmap)
|
||||
ItemLine::ItemLine(QPixmap &&pixmap)
|
||||
: _pixmap(std::move(pixmap))
|
||||
, _rect(QPointF(), _pixmap.size() / float64(style::DevicePixelRatio())) {
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Editor {
|
|||
|
||||
class ItemLine : public NumberedItem {
|
||||
public:
|
||||
ItemLine(const QPixmap &&pixmap);
|
||||
ItemLine(QPixmap &&pixmap);
|
||||
QRectF boundingRect() const override;
|
||||
void paint(
|
||||
QPainter *p,
|
||||
|
|
Loading…
Add table
Reference in a new issue