From 6257445d5ec588996d69ea724b7f0bffecfa4c1d Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 29 Sep 2020 19:09:16 +0300 Subject: [PATCH] Fix build on Xcode 12. --- .../platform/mac/touchbar/items/mac_pinned_chats_item.mm | 8 ++++---- cmake | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm index 9a32a7738..933036325 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm @@ -534,7 +534,7 @@ TimeId CalculateOnlineTill(not_null peer) { }; const auto updateUserpics = [=] { ranges::for_each(_pins, singleUserpic); - *lastDialogsCount = [self shift] + std::ssize(_pins); + *lastDialogsCount = [self shift] + int(std::size(_pins)); }; const auto updateBadge = [=](const auto &pin) { const auto peer = pin->peer; @@ -759,7 +759,7 @@ TimeId CalculateOnlineTill(not_null peer) { - (void)performAction:(int)xPosition { const auto index = [self indexFromX:xPosition]; - const auto peer = (index < 0 || index >= std::ssize(_pins)) + const auto peer = (index < 0 || index >= int(std::size(_pins))) ? nullptr : _pins[index]->peer; if (!peer && !_hasArchive && !_selfUnpinned) { @@ -786,7 +786,7 @@ TimeId CalculateOnlineTill(not_null peer) { } - (QImage)imageToDraw:(int)i { - Expects(i < std::ssize(_pins)); + Expects(i < int(std::size(_pins))); if (i < 0) { if (_hasArchive && (i == -[self shift])) { return _archive; @@ -872,7 +872,7 @@ TimeId CalculateOnlineTill(not_null peer) { [self drawSinglePin:indexToTop rect:dirtyRect]; } }); - for (auto i = -shift; i < std::ssize(_pins); i++) { + for (auto i = -shift; i < int(std::size(_pins)); i++) { if (i >= 0 && _pins[i]->onTop && (indexToTop < 0)) { indexToTop = i; continue; diff --git a/cmake b/cmake index c9d1ac50d..5d6f8ebee 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit c9d1ac50d3ed77f424f5a8e12c9924df2c35440c +Subproject commit 5d6f8ebee32e334543b3f1fa43907a700bf8bde7