mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-25 15:03:03 +02:00
Fix build with Xcode.
This commit is contained in:
parent
6a3989488e
commit
fcd37adc38
4 changed files with 16 additions and 6 deletions
|
@ -83,7 +83,6 @@ void ConfirmApproval(
|
|||
not_null<HistoryItem*> item,
|
||||
TimeId scheduleDate = 0,
|
||||
Fn<void()> accepted = nullptr) {
|
||||
using Flag = MTPmessages_ToggleSuggestedPostApproval::Flag;
|
||||
const auto suggestion = item->Get<HistoryMessageSuggestedPost>();
|
||||
if (!suggestion
|
||||
|| suggestion->accepted
|
||||
|
|
|
@ -101,9 +101,21 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
friend inline constexpr auto operator<=>(CreditsAmount, CreditsAmount)
|
||||
= default;
|
||||
friend inline constexpr bool operator==(CreditsAmount, CreditsAmount)
|
||||
// AppleClang :/
|
||||
// friend inline auto operator<=>(CreditsAmount, CreditsAmount)
|
||||
// = default;
|
||||
friend inline constexpr auto operator<=>(
|
||||
CreditsAmount a,
|
||||
CreditsAmount b) {
|
||||
if (const auto r1 = (int(a._ton) <=> int(b._ton)); r1 != 0) {
|
||||
return r1;
|
||||
} else if (auto r2 = (a._whole <=> b._whole); r2 != 0) {
|
||||
return r2;
|
||||
}
|
||||
return (a._nano <=> b._nano);
|
||||
}
|
||||
|
||||
friend inline bool operator==(CreditsAmount, CreditsAmount)
|
||||
= default;
|
||||
|
||||
[[nodiscard]] CreditsAmount abs() const {
|
||||
|
|
|
@ -256,7 +256,6 @@ void TodoList::updateTexts() {
|
|||
}));
|
||||
}
|
||||
if (_flags != _todolist->flags() || _subtitle.isEmpty()) {
|
||||
using Flag = PollData::Flag;
|
||||
_flags = _todolist->flags();
|
||||
_subtitle.setText(
|
||||
st::msgDateTextStyle,
|
||||
|
|
|
@ -81,7 +81,7 @@ std::optional<int64> ParseAmountNano(QString trimmed) {
|
|||
auto digitsCount = 0;
|
||||
for (auto i = 0; i != result.text.size();) {
|
||||
const auto ch = result.text[i];
|
||||
const auto atSeparator = result.text.midRef(i).startsWith(separator);
|
||||
const auto atSeparator = QStringView(result.text).mid(i).startsWith(separator);
|
||||
if (ch >= '0' && ch <= '9' && digitsCount < kMaxDigitsCount) {
|
||||
++i;
|
||||
++digitsCount;
|
||||
|
|
Loading…
Add table
Reference in a new issue