aboutsummaryrefslogtreecommitdiffhomepage
path: root/tdutils/td/utils/MemoryLog.h
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2021-10-20 01:27:02 +0300
committerlevlam <levlam@telegram.org>2021-10-20 01:27:02 +0300
commit1e49f6dc13d6cad09f80c8e5a194ccea422f42cc (patch)
treebf957c39bb2fbdf8b887ee2f4ccfd4ecc232e11d /tdutils/td/utils/MemoryLog.h
parentd225bdf073c68d42536d42e46ddf8648538555b9 (diff)
Use auto as variable type if it is initialized with a cast.
Diffstat (limited to 'tdutils/td/utils/MemoryLog.h')
-rw-r--r--tdutils/td/utils/MemoryLog.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tdutils/td/utils/MemoryLog.h b/tdutils/td/utils/MemoryLog.h
index a634a0955..4e837b769 100644
--- a/tdutils/td/utils/MemoryLog.h
+++ b/tdutils/td/utils/MemoryLog.h
@@ -47,8 +47,8 @@ class MemoryLog final : public LogInterface {
CHECK(slice_size * 3 < buffer_size);
size_t pad_size = ((slice_size + 15) & ~15) - slice_size;
constexpr size_t MAGIC_SIZE = 16;
- uint32 total_size = static_cast<uint32>(slice_size + pad_size + MAGIC_SIZE);
- uint32 real_pos = pos_.fetch_add(total_size, std::memory_order_relaxed);
+ auto total_size = static_cast<uint32>(slice_size + pad_size + MAGIC_SIZE);
+ auto real_pos = pos_.fetch_add(total_size, std::memory_order_relaxed);
CHECK((total_size & 15) == 0);
uint32 start_pos = real_pos & (buffer_size - 1);