aboutsummaryrefslogtreecommitdiffhomepage
path: root/tdnet
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2021-07-03 23:51:36 +0300
committerlevlam <levlam@telegram.org>2021-07-03 23:51:36 +0300
commitedfa5d1d982a8d499877eb9fafc5192a0baa2974 (patch)
tree0badfea5d1ec8da265586cb737aaf3f1549d8b5c /tdnet
parent3ead565d675c0317abcfdb70b28eac3bb5659425 (diff)
Use final instead of override.
Diffstat (limited to 'tdnet')
-rw-r--r--tdnet/td/net/GetHostByNameActor.cpp4
-rw-r--r--tdnet/td/net/HttpChunkedByteFlow.h2
-rw-r--r--tdnet/td/net/HttpConnectionBase.h12
-rw-r--r--tdnet/td/net/HttpContentLengthByteFlow.h2
-rw-r--r--tdnet/td/net/HttpInboundConnection.h6
-rw-r--r--tdnet/td/net/HttpOutboundConnection.h6
-rw-r--r--tdnet/td/net/HttpProxy.h2
-rw-r--r--tdnet/td/net/Socks5.h2
-rw-r--r--tdnet/td/net/SslStream.cpp4
-rw-r--r--tdnet/td/net/TcpListener.h8
-rw-r--r--tdnet/td/net/Wget.h12
11 files changed, 30 insertions, 30 deletions
diff --git a/tdnet/td/net/GetHostByNameActor.cpp b/tdnet/td/net/GetHostByNameActor.cpp
index 371aaefc5..c1f944c31 100644
--- a/tdnet/td/net/GetHostByNameActor.cpp
+++ b/tdnet/td/net/GetHostByNameActor.cpp
@@ -34,7 +34,7 @@ class GoogleDnsResolver : public Actor {
ActorOwn<Wget> wget_;
double begin_time_ = 0;
- void start_up() override {
+ void start_up() final {
auto r_address = IPAddress::get_ip_address(host_);
if (r_address.is_ok()) {
promise_.set_value(r_address.move_as_ok());
@@ -97,7 +97,7 @@ class NativeDnsResolver : public Actor {
bool prefer_ipv6_;
Promise<IPAddress> promise_;
- void start_up() override {
+ void start_up() final {
IPAddress ip;
auto begin_time = Time::now();
auto status = ip.init_host_port(host_, 0, prefer_ipv6_);
diff --git a/tdnet/td/net/HttpChunkedByteFlow.h b/tdnet/td/net/HttpChunkedByteFlow.h
index 748a9da5b..af3d208e4 100644
--- a/tdnet/td/net/HttpChunkedByteFlow.h
+++ b/tdnet/td/net/HttpChunkedByteFlow.h
@@ -14,7 +14,7 @@ namespace td {
class HttpChunkedByteFlow final : public ByteFlowBase {
public:
- bool loop() override;
+ bool loop() final;
private:
static constexpr int MAX_CHUNK_SIZE = 15 << 20; // some reasonable limit
diff --git a/tdnet/td/net/HttpConnectionBase.h b/tdnet/td/net/HttpConnectionBase.h
index 57e8ab1c0..43e7ec676 100644
--- a/tdnet/td/net/HttpConnectionBase.h
+++ b/tdnet/td/net/HttpConnectionBase.h
@@ -61,13 +61,13 @@ class HttpConnectionBase : public Actor {
void live_event();
- void start_up() override;
- void tear_down() override;
- void timeout_expired() override;
- void loop() override;
+ void start_up() final;
+ void tear_down() final;
+ void timeout_expired() final;
+ void loop() final;
- void on_start_migrate(int32 sched_id) override;
- void on_finish_migrate() override;
+ void on_start_migrate(int32 sched_id) final;
+ void on_finish_migrate() final;
virtual void on_query(unique_ptr<HttpQuery> query) = 0;
virtual void on_error(Status error) = 0;
diff --git a/tdnet/td/net/HttpContentLengthByteFlow.h b/tdnet/td/net/HttpContentLengthByteFlow.h
index 409b083ea..272374f08 100644
--- a/tdnet/td/net/HttpContentLengthByteFlow.h
+++ b/tdnet/td/net/HttpContentLengthByteFlow.h
@@ -15,7 +15,7 @@ class HttpContentLengthByteFlow final : public ByteFlowBase {
HttpContentLengthByteFlow() = default;
explicit HttpContentLengthByteFlow(size_t len) : len_(len) {
}
- bool loop() override;
+ bool loop() final;
private:
static constexpr size_t MIN_UPDATE_SIZE = 1 << 14;
diff --git a/tdnet/td/net/HttpInboundConnection.h b/tdnet/td/net/HttpInboundConnection.h
index ca885e01e..4d5a387b3 100644
--- a/tdnet/td/net/HttpInboundConnection.h
+++ b/tdnet/td/net/HttpInboundConnection.h
@@ -31,9 +31,9 @@ class HttpInboundConnection final : public detail::HttpConnectionBase {
ActorShared<Callback> callback, int32 slow_scheduler_id = -1);
private:
- void on_query(unique_ptr<HttpQuery> query) override;
- void on_error(Status error) override;
- void hangup() override {
+ void on_query(unique_ptr<HttpQuery> query) final;
+ void on_error(Status error) final;
+ void hangup() final {
callback_.release();
stop();
}
diff --git a/tdnet/td/net/HttpOutboundConnection.h b/tdnet/td/net/HttpOutboundConnection.h
index e2a958dc4..cfefc12bb 100644
--- a/tdnet/td/net/HttpOutboundConnection.h
+++ b/tdnet/td/net/HttpOutboundConnection.h
@@ -36,9 +36,9 @@ class HttpOutboundConnection final : public detail::HttpConnectionBase {
// void write_error(Status error);
private:
- void on_query(unique_ptr<HttpQuery> query) override;
- void on_error(Status error) override;
- void hangup() override {
+ void on_query(unique_ptr<HttpQuery> query) final;
+ void on_error(Status error) final;
+ void hangup() final {
callback_.release();
HttpConnectionBase::hangup();
}
diff --git a/tdnet/td/net/HttpProxy.h b/tdnet/td/net/HttpProxy.h
index 89f64c784..613dfc513 100644
--- a/tdnet/td/net/HttpProxy.h
+++ b/tdnet/td/net/HttpProxy.h
@@ -22,7 +22,7 @@ class HttpProxy : public TransparentProxy {
void send_connect();
Status wait_connect_response();
- Status loop_impl() override;
+ Status loop_impl() final;
};
} // namespace td
diff --git a/tdnet/td/net/Socks5.h b/tdnet/td/net/Socks5.h
index 9f79deaea..97531011f 100644
--- a/tdnet/td/net/Socks5.h
+++ b/tdnet/td/net/Socks5.h
@@ -33,7 +33,7 @@ class Socks5 : public TransparentProxy {
void send_ip_address();
Status wait_ip_address_response();
- Status loop_impl() override;
+ Status loop_impl() final;
};
} // namespace td
diff --git a/tdnet/td/net/SslStream.cpp b/tdnet/td/net/SslStream.cpp
index 94eb90858..8d43c43a0 100644
--- a/tdnet/td/net/SslStream.cpp
+++ b/tdnet/td/net/SslStream.cpp
@@ -388,7 +388,7 @@ class SslStreamImpl {
public:
explicit SslReadByteFlow(SslStreamImpl *stream) : stream_(stream) {
}
- bool loop() override {
+ bool loop() final {
auto to_read = output_.prepare_append();
auto r_size = stream_->read(to_read);
if (r_size.is_error()) {
@@ -415,7 +415,7 @@ class SslStreamImpl {
public:
explicit SslWriteByteFlow(SslStreamImpl *stream) : stream_(stream) {
}
- bool loop() override {
+ bool loop() final {
auto to_write = input_->prepare_read();
auto r_size = stream_->write(to_write);
if (r_size.is_error()) {
diff --git a/tdnet/td/net/TcpListener.h b/tdnet/td/net/TcpListener.h
index ee46c500b..eee2a74d8 100644
--- a/tdnet/td/net/TcpListener.h
+++ b/tdnet/td/net/TcpListener.h
@@ -22,16 +22,16 @@ class TcpListener final : public Actor {
};
TcpListener(int port, ActorShared<Callback> callback, Slice server_address = Slice("0.0.0.0"));
- void hangup() override;
+ void hangup() final;
private:
int port_;
ServerSocketFd server_fd_;
ActorShared<Callback> callback_;
const string server_address_;
- void start_up() override;
- void tear_down() override;
- void loop() override;
+ void start_up() final;
+ void tear_down() final;
+ void loop() final;
};
} // namespace td
diff --git a/tdnet/td/net/Wget.h b/tdnet/td/net/Wget.h
index 8ffe77d23..4f22a085e 100644
--- a/tdnet/td/net/Wget.h
+++ b/tdnet/td/net/Wget.h
@@ -29,15 +29,15 @@ class Wget : public HttpOutboundConnection::Callback {
private:
Status try_init();
- void loop() override;
- void handle(unique_ptr<HttpQuery> result) override;
- void on_connection_error(Status error) override;
+ void loop() final;
+ void handle(unique_ptr<HttpQuery> result) final;
+ void on_connection_error(Status error) final;
void on_ok(unique_ptr<HttpQuery> http_query_ptr);
void on_error(Status error);
- void tear_down() override;
- void start_up() override;
- void timeout_expired() override;
+ void tear_down() final;
+ void start_up() final;
+ void timeout_expired() final;
Promise<unique_ptr<HttpQuery>> promise_;
ActorOwn<HttpOutboundConnection> connection_;