aboutsummaryrefslogtreecommitdiffhomepage
path: root/tddb
diff options
context:
space:
mode:
Diffstat (limited to 'tddb')
-rw-r--r--tddb/td/db/binlog/Binlog.cpp4
-rw-r--r--tddb/td/db/binlog/BinlogEvent.cpp2
-rw-r--r--tddb/td/db/binlog/BinlogEvent.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/tddb/td/db/binlog/Binlog.cpp b/tddb/td/db/binlog/Binlog.cpp
index ddd6a723c..3ad28c8e9 100644
--- a/tddb/td/db/binlog/Binlog.cpp
+++ b/tddb/td/db/binlog/Binlog.cpp
@@ -581,9 +581,9 @@ Status Binlog::load_binlog(const Callback &callback, const Callback &debug_callb
}
void Binlog::update_encryption(Slice key, Slice iv) {
- as_slice(aes_ctr_key_).copy_from(key);
+ as_mutable_slice(aes_ctr_key_).copy_from(key);
UInt128 aes_ctr_iv;
- as_slice(aes_ctr_iv).copy_from(iv);
+ as_mutable_slice(aes_ctr_iv).copy_from(iv);
aes_ctr_state_.init(as_slice(aes_ctr_key_), as_slice(aes_ctr_iv));
}
diff --git a/tddb/td/db/binlog/BinlogEvent.cpp b/tddb/td/db/binlog/BinlogEvent.cpp
index 0b0801815..56926180d 100644
--- a/tddb/td/db/binlog/BinlogEvent.cpp
+++ b/tddb/td/db/binlog/BinlogEvent.cpp
@@ -55,7 +55,7 @@ Status BinlogEvent::validate() const {
BufferSlice BinlogEvent::create_raw(uint64 id, int32 type, int32 flags, const Storer &storer) {
auto raw_event = BufferSlice{storer.size() + MIN_SIZE};
- TlStorerUnsafe tl_storer(raw_event.as_slice().ubegin());
+ TlStorerUnsafe tl_storer(raw_event.as_mutable_slice().ubegin());
tl_storer.store_int(narrow_cast<int32>(raw_event.size()));
tl_storer.store_long(id);
tl_storer.store_int(type);
diff --git a/tddb/td/db/binlog/BinlogEvent.h b/tddb/td/db/binlog/BinlogEvent.h
index 0127163ba..c429638a2 100644
--- a/tddb/td/db/binlog/BinlogEvent.h
+++ b/tddb/td/db/binlog/BinlogEvent.h
@@ -100,7 +100,7 @@ struct BinlogEvent {
static BufferSlice create_raw(uint64 id, int32 type, int32 flags, const Storer &storer);
- std::string public_to_string() const {
+ string public_to_string() const {
return PSTRING() << "LogEvent[" << tag("id", format::as_hex(id_)) << tag("type", type_) << tag("flags", flags_)
<< tag("data", get_data().size()) << "]" << debug_info_;
}