Fix build on Xcode 12.

This commit is contained in:
John Preston 2020-09-29 19:09:16 +03:00
parent 405c8125da
commit 6257445d5e
2 changed files with 5 additions and 5 deletions

View file

@ -534,7 +534,7 @@ TimeId CalculateOnlineTill(not_null<PeerData*> peer) {
}; };
const auto updateUserpics = [=] { const auto updateUserpics = [=] {
ranges::for_each(_pins, singleUserpic); 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 updateBadge = [=](const auto &pin) {
const auto peer = pin->peer; const auto peer = pin->peer;
@ -759,7 +759,7 @@ TimeId CalculateOnlineTill(not_null<PeerData*> peer) {
- (void)performAction:(int)xPosition { - (void)performAction:(int)xPosition {
const auto index = [self indexFromX: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 ? nullptr
: _pins[index]->peer; : _pins[index]->peer;
if (!peer && !_hasArchive && !_selfUnpinned) { if (!peer && !_hasArchive && !_selfUnpinned) {
@ -786,7 +786,7 @@ TimeId CalculateOnlineTill(not_null<PeerData*> peer) {
} }
- (QImage)imageToDraw:(int)i { - (QImage)imageToDraw:(int)i {
Expects(i < std::ssize(_pins)); Expects(i < int(std::size(_pins)));
if (i < 0) { if (i < 0) {
if (_hasArchive && (i == -[self shift])) { if (_hasArchive && (i == -[self shift])) {
return _archive; return _archive;
@ -872,7 +872,7 @@ TimeId CalculateOnlineTill(not_null<PeerData*> peer) {
[self drawSinglePin:indexToTop rect:dirtyRect]; [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)) { if (i >= 0 && _pins[i]->onTop && (indexToTop < 0)) {
indexToTop = i; indexToTop = i;
continue; continue;

2
cmake

@ -1 +1 @@
Subproject commit c9d1ac50d3ed77f424f5a8e12c9924df2c35440c Subproject commit 5d6f8ebee32e334543b3f1fa43907a700bf8bde7