mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-26 07:23:02 +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(
|
void Stickers::setPackAndEmoji(
|
||||||
StickersSet &set,
|
StickersSet &set,
|
||||||
StickersPack &&pack,
|
StickersPack &&pack,
|
||||||
const std::vector<TimeId> &&dates,
|
std::vector<TimeId> &&dates,
|
||||||
const QVector<MTPStickerPack> &packs) {
|
const QVector<MTPStickerPack> &packs) {
|
||||||
set.stickers = std::move(pack);
|
set.stickers = std::move(pack);
|
||||||
set.dates = std::move(dates);
|
set.dates = std::move(dates);
|
||||||
|
|
|
@ -291,7 +291,7 @@ private:
|
||||||
void setPackAndEmoji(
|
void setPackAndEmoji(
|
||||||
StickersSet &set,
|
StickersSet &set,
|
||||||
StickersPack &&pack,
|
StickersPack &&pack,
|
||||||
const std::vector<TimeId> &&dates,
|
std::vector<TimeId> &&dates,
|
||||||
const QVector<MTPStickerPack> &packs);
|
const QVector<MTPStickerPack> &packs);
|
||||||
void somethingReceived(
|
void somethingReceived(
|
||||||
const QVector<MTPStickerSet> &list,
|
const QVector<MTPStickerSet> &list,
|
||||||
|
|
|
@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
namespace Editor {
|
namespace Editor {
|
||||||
|
|
||||||
ItemImage::ItemImage(
|
ItemImage::ItemImage(
|
||||||
const QPixmap &&pixmap,
|
QPixmap &&pixmap,
|
||||||
ItemBase::Data data)
|
ItemBase::Data data)
|
||||||
: ItemBase(std::move(data))
|
: ItemBase(std::move(data))
|
||||||
, _pixmap(std::move(pixmap)) {
|
, _pixmap(std::move(pixmap)) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace Editor {
|
||||||
class ItemImage : public ItemBase {
|
class ItemImage : public ItemBase {
|
||||||
public:
|
public:
|
||||||
ItemImage(
|
ItemImage(
|
||||||
const QPixmap &&pixmap,
|
QPixmap &&pixmap,
|
||||||
ItemBase::Data data);
|
ItemBase::Data data);
|
||||||
void paint(
|
void paint(
|
||||||
QPainter *p,
|
QPainter *p,
|
||||||
|
|
|
@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
namespace Editor {
|
namespace Editor {
|
||||||
|
|
||||||
ItemLine::ItemLine(const QPixmap &&pixmap)
|
ItemLine::ItemLine(QPixmap &&pixmap)
|
||||||
: _pixmap(std::move(pixmap))
|
: _pixmap(std::move(pixmap))
|
||||||
, _rect(QPointF(), _pixmap.size() / float64(style::DevicePixelRatio())) {
|
, _rect(QPointF(), _pixmap.size() / float64(style::DevicePixelRatio())) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Editor {
|
||||||
|
|
||||||
class ItemLine : public NumberedItem {
|
class ItemLine : public NumberedItem {
|
||||||
public:
|
public:
|
||||||
ItemLine(const QPixmap &&pixmap);
|
ItemLine(QPixmap &&pixmap);
|
||||||
QRectF boundingRect() const override;
|
QRectF boundingRect() const override;
|
||||||
void paint(
|
void paint(
|
||||||
QPainter *p,
|
QPainter *p,
|
||||||
|
|
Loading…
Add table
Reference in a new issue