2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Replace base::lambda with shorter term.

base::lambda -> Fn (type alias for std::function).
base::lambda_once -> FnMut (type alias for base::unique_function).
base::lambda_guarded -> crl::guard.
base::lambda_call_type_t -> crl::deduced_call_type.
This commit is contained in:
John Preston
2018-06-04 18:35:11 +03:00
parent 8d1cdea31a
commit dd81f5d59f
216 changed files with 792 additions and 1455 deletions

View File

@@ -125,7 +125,7 @@ public:
bool isPointAfter(QPoint position) const;
void moveInAlbum(QPoint to);
QPoint center() const;
void suggestMove(float64 delta, base::lambda<void()> callback);
void suggestMove(float64 delta, Fn<void()> callback);
void finishAnimations();
private:
@@ -520,7 +520,7 @@ QPoint AlbumThumb::center() const {
return realGeometry.center();
}
void AlbumThumb::suggestMove(float64 delta, base::lambda<void()> callback) {
void AlbumThumb::suggestMove(float64 delta, Fn<void()> callback) {
if (_suggestedMove != delta) {
_suggestedMoveAnimation.start(
std::move(callback),
@@ -889,7 +889,7 @@ rpl::producer<int> SingleFilePreview::desiredHeightValue() const {
return rpl::single(st::boxPhotoPadding.top() + h + st::msgShadow);
}
base::lambda<QString()> FieldPlaceholder(const Storage::PreparedList &list) {
Fn<QString()> FieldPlaceholder(const Storage::PreparedList &list) {
return langFactory(list.files.size() > 1
? lng_photos_comment
: lng_photo_caption);