2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +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

@@ -1110,7 +1110,7 @@ void mtpFileLoader::changeCDNParams(
makeRequest(offset);
}
base::optional<Storage::Cache::Key> mtpFileLoader::cacheKey() const {
std::optional<Storage::Cache::Key> mtpFileLoader::cacheKey() const {
if (_urlLocation) {
return Data::WebDocumentCacheKey(*_urlLocation);
} else if (_location) {
@@ -1118,7 +1118,7 @@ base::optional<Storage::Cache::Key> mtpFileLoader::cacheKey() const {
} else if (_toCache == LoadToCacheAsWell) {
return Data::DocumentCacheKey(_dcId, _id);
}
return base::none;
return std::nullopt;
}
mtpFileLoader::~mtpFileLoader() {
@@ -1219,7 +1219,7 @@ void webFileLoader::onError() {
cancel(true);
}
base::optional<Storage::Cache::Key> webFileLoader::cacheKey() const {
std::optional<Storage::Cache::Key> webFileLoader::cacheKey() const {
return Data::UrlCacheKey(_url);
}