From 61a61669b6b26fc67c48a7e6b04ed1fac63e8ef9 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 28 Apr 2023 22:03:27 +0400 Subject: [PATCH] Fix build with Xcode. --- Telegram/SourceFiles/history/history_item.cpp | 4 ++-- Telegram/SourceFiles/history/history_item.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index e4ccb977f..a63048d06 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -86,8 +86,8 @@ using ItemPreview = HistoryView::ItemPreview; if (!m.hasMatch()) { return text; } - const auto codeStart = m.capturedStart(1); - const auto codeLength = m.capturedLength(1); + const auto codeStart = int(m.capturedStart(1)); + const auto codeLength = int(m.capturedLength(1)); auto i = text.entities.begin(); const auto e = text.entities.end(); while (i != e && i->offset() < codeStart) { diff --git a/Telegram/SourceFiles/history/history_item.h b/Telegram/SourceFiles/history/history_item.h index 3ce4cdcc5..b26793963 100644 --- a/Telegram/SourceFiles/history/history_item.h +++ b/Telegram/SourceFiles/history/history_item.h @@ -82,7 +82,6 @@ class Element; class Message; class Service; class ServiceMessagePainter; -struct NotificationTextOptions; } // namespace HistoryView class HistoryItem final : public RuntimeComposer { @@ -361,7 +360,10 @@ public: }; [[nodiscard]] QString notificationHeader() const; [[nodiscard]] TextWithEntities notificationText( - NotificationTextOptions options = {}) const; + NotificationTextOptions options) const; + [[nodiscard]] TextWithEntities notificationText() const { + return notificationText({}); + } using ToPreviewOptions = HistoryView::ToPreviewOptions; using ItemPreview = HistoryView::ItemPreview;