Fix tdweb build.
GitOrigin-RevId: 3609f3fa52030a242d0587d2ca6f584417af247b
This commit is contained in:
parent
51ff6105cb
commit
3cc97684ec
@ -67,7 +67,7 @@ class TdReceiver {
|
||||
MultiClient::Response receive(double timeout) {
|
||||
if (!responses_.empty()) {
|
||||
auto result = std::move(responses_.front());
|
||||
responses_.pop_front();
|
||||
responses_.pop();
|
||||
return result;
|
||||
}
|
||||
return {0, 0, nullptr};
|
||||
@ -79,17 +79,17 @@ class TdReceiver {
|
||||
Callback(MultiClient::ClientId client_id, TdReceiver *impl) : client_id_(client_id), impl_(impl) {
|
||||
}
|
||||
void on_result(uint64 id, td_api::object_ptr<td_api::Object> result) override {
|
||||
impl_->responses_.push_back({client_id_, id, std::move(result)});
|
||||
impl_->responses_.push({client_id_, id, std::move(result)});
|
||||
}
|
||||
void on_error(uint64 id, td_api::object_ptr<td_api::error> error) override {
|
||||
impl_->responses_.push_back({client_id_, id, std::move(error)});
|
||||
impl_->responses_.push({client_id_, id, std::move(error)});
|
||||
}
|
||||
Callback(const Callback &) = delete;
|
||||
Callback &operator=(const Callback &) = delete;
|
||||
Callback(Callback &&) = delete;
|
||||
Callback &operator=(Callback &&) = delete;
|
||||
~Callback() override {
|
||||
impl_->responses_.push_back({client_id_, 0, nullptr});
|
||||
impl_->responses_.push({client_id_, 0, nullptr});
|
||||
}
|
||||
|
||||
private:
|
||||
@ -153,7 +153,6 @@ class MultiClient::Impl final {
|
||||
return response;
|
||||
}
|
||||
|
||||
Impl() = default;
|
||||
Impl(const Impl &) = delete;
|
||||
Impl &operator=(const Impl &) = delete;
|
||||
Impl(Impl &&) = delete;
|
||||
|
@ -161,6 +161,7 @@ class MultiClient final {
|
||||
MultiClient &operator=(MultiClient &&other);
|
||||
|
||||
private:
|
||||
friend class Client;
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> impl_;
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ int32 PartsManager::set_streaming_offset(int64 offset) {
|
||||
return finish();
|
||||
}
|
||||
|
||||
int32 PartsManager::get_pending_count() {
|
||||
int32 PartsManager::get_pending_count() const {
|
||||
return pending_count_;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ class PartsManager {
|
||||
int32 get_ready_prefix_count();
|
||||
int64 get_streaming_offset() const;
|
||||
string get_bitmask();
|
||||
int32 get_pending_count();
|
||||
int32 get_pending_count() const;
|
||||
|
||||
private:
|
||||
static constexpr int MAX_PART_COUNT = 4000;
|
||||
|
Loading…
Reference in New Issue
Block a user