aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/secret.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2023-02-02 17:40:47 +0300
committerlevlam <levlam@telegram.org>2023-02-02 17:40:47 +0300
commit0adcac246adef771d5a97c44dde6ebbcc01030ac (patch)
tree2ae0e2e408a193dac10f5df76a2057cc5dd87fca /test/secret.cpp
parentd6b7770561359019f77598525a69799b93f948b1 (diff)
Use explicit as_mutable_slice to get MutableSlice.
Diffstat (limited to 'test/secret.cpp')
-rw-r--r--test/secret.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/secret.cpp b/test/secret.cpp
index 05b91af1c..587a2d314 100644
--- a/test/secret.cpp
+++ b/test/secret.cpp
@@ -832,7 +832,7 @@ class Master final : public Actor {
config.version_ = 12;
auto storer = TLObjectStorer<my_api::messages_dhConfig>(config);
BufferSlice answer(storer.size());
- auto real_size = storer.store(answer.as_slice().ubegin());
+ auto real_size = storer.store(answer.as_mutable_slice().ubegin());
CHECK(real_size == answer.size());
net_query->set_ok(std::move(answer));
send_closure(std::move(callback), &NetQueryCallback::on_result, std::move(net_query));
@@ -857,7 +857,7 @@ class Master final : public Actor {
my_api::encryptedChat encrypted_chat(123, 321, 0, 1, 2, BufferSlice(), request_encryption.key_fingerprint_);
auto storer = TLObjectStorer<my_api::encryptedChat>(encrypted_chat);
BufferSlice answer(storer.size());
- auto real_size = storer.store(answer.as_slice().ubegin());
+ auto real_size = storer.store(answer.as_mutable_slice().ubegin());
CHECK(real_size == answer.size());
net_query->set_ok(std::move(answer));
send_closure(std::move(callback), &NetQueryCallback::on_result, std::move(net_query));
@@ -899,8 +899,8 @@ class Master final : public Actor {
void process_net_query_send_encrypted(BufferSlice data, NetQueryPtr net_query,
ActorShared<NetQueryCallback> callback) {
BufferSlice answer(8);
- answer.as_slice().fill(0);
- as<int32>(answer.as_slice().begin()) = static_cast<int32>(my_api::messages_sentEncryptedMessage::ID);
+ answer.as_mutable_slice().fill(0);
+ as<int32>(answer.as_mutable_slice().begin()) = static_cast<int32>(my_api::messages_sentEncryptedMessage::ID);
net_query->set_ok(std::move(answer));
send_closure(std::move(callback), &NetQueryCallback::on_result, std::move(net_query));