From 751dae9e645ffda1f04b22741a219f896ce73aa7 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 2 Mar 2020 02:15:12 +0300 Subject: [PATCH] Remove now unneded dummy parameters. GitOrigin-RevId: 4ffd517ab80431c0d52b2c0a1b01b0216383aefd --- td/telegram/StorageManager.cpp | 10 +++++----- td/telegram/StorageManager.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/td/telegram/StorageManager.cpp b/td/telegram/StorageManager.cpp index 5035db4b3..fd8a79fd8 100644 --- a/td/telegram/StorageManager.cpp +++ b/td/telegram/StorageManager.cpp @@ -122,7 +122,7 @@ void StorageManager::run_gc(FileGcParameters parameters, Promise prom PromiseCreator::lambda( [actor_id = actor_id(this), parameters = std::move(parameters)](Result file_stats) { send_closure(actor_id, &StorageManager::on_all_files, std::move(parameters), - std::move(file_stats), false); + std::move(file_stats)); })); //NB: get_storage_stats will cancel all gc queries, so promise needs to be added after the call @@ -153,20 +153,20 @@ void StorageManager::create_stats_worker() { } } -void StorageManager::on_all_files(FileGcParameters gc_parameters, Result r_file_stats, bool dummy) { +void StorageManager::on_all_files(FileGcParameters gc_parameters, Result r_file_stats) { int32 dialog_limit = gc_parameters.dialog_limit; if (is_closed_ && r_file_stats.is_ok()) { r_file_stats = Status::Error(500, "Request aborted"); } if (r_file_stats.is_error()) { - return on_gc_finished(dialog_limit, std::move(r_file_stats), false); + return on_gc_finished(dialog_limit, std::move(r_file_stats)); } create_gc_worker(); send_closure(gc_worker_, &FileGcWorker::run_gc, std::move(gc_parameters), r_file_stats.move_as_ok().all_files, PromiseCreator::lambda([actor_id = actor_id(this), dialog_limit](Result r_file_stats) { - send_closure(actor_id, &StorageManager::on_gc_finished, dialog_limit, std::move(r_file_stats), false); + send_closure(actor_id, &StorageManager::on_gc_finished, dialog_limit, std::move(r_file_stats)); })); } @@ -212,7 +212,7 @@ void StorageManager::create_gc_worker() { } } -void StorageManager::on_gc_finished(int32 dialog_limit, Result r_file_stats, bool dummy) { +void StorageManager::on_gc_finished(int32 dialog_limit, Result r_file_stats) { if (r_file_stats.is_error()) { if (r_file_stats.error().code() != 500) { LOG(ERROR) << "GC failed: " << r_file_stats.error(); diff --git a/td/telegram/StorageManager.h b/td/telegram/StorageManager.h index 810041d3d..c828adad8 100644 --- a/td/telegram/StorageManager.h +++ b/td/telegram/StorageManager.h @@ -87,9 +87,9 @@ class StorageManager : public Actor { uint32 last_gc_timestamp_ = 0; double next_gc_at_ = 0; - void on_all_files(FileGcParameters gc_parameters, Result r_file_stats, bool dummy); + void on_all_files(FileGcParameters gc_parameters, Result r_file_stats); void create_gc_worker(); - void on_gc_finished(int32 dialog_limit, Result r_file_stats, bool dummy); + void on_gc_finished(int32 dialog_limit, Result r_file_stats); void close_stats_worker(); void close_gc_worker();