2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Move to std::optional.

This commit is contained in:
John Preston
2018-09-21 19:28:46 +03:00
parent 850efbde95
commit 2e5a0e056c
115 changed files with 632 additions and 672 deletions

View File

@@ -4232,7 +4232,7 @@ void incrementRecentHashtag(RecentHashtagPack &recent, const QString &tag) {
}
}
base::optional<RecentHashtagPack> saveRecentHashtags(
std::optional<RecentHashtagPack> saveRecentHashtags(
Fn<RecentHashtagPack()> getPack,
const QString &text) {
auto found = false;
@@ -4262,7 +4262,7 @@ base::optional<RecentHashtagPack> saveRecentHashtags(
found = true;
incrementRecentHashtag(recent, tag);
}
return found ? base::make_optional(recent) : base::none;
return found ? base::make_optional(recent) : std::nullopt;
}
void saveRecentSentHashtags(const QString &text) {