From 9828262a033e242825164539dd34f48d8ca72dda Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Fri, 1 May 2020 10:47:08 +0300 Subject: [PATCH] Update GSL to v3.0.1 and lib_base * Use identical types for std::min. --- Telegram/SourceFiles/media/streaming/media_streaming_file.cpp | 4 ++-- Telegram/SourceFiles/mtproto/details/mtproto_tls_socket.cpp | 2 +- Telegram/ThirdParty/GSL | 2 +- Telegram/lib_base | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp index bf78ce6a6..2ea0a1629 100644 --- a/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp +++ b/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp @@ -40,8 +40,8 @@ int64_t File::Context::Seek(void *opaque, int64_t offset, int whence) { } int File::Context::read(bytes::span buffer) { - const auto amount = std::min(size_type(_size - _offset), buffer.size()); - Assert(amount >= 0); + Assert(_size >= _offset); + const auto amount = std::min(std::size_t(_size - _offset), buffer.size()); if (unroll()) { return -1; diff --git a/Telegram/SourceFiles/mtproto/details/mtproto_tls_socket.cpp b/Telegram/SourceFiles/mtproto/details/mtproto_tls_socket.cpp index 385dff13a..55e6e1d0c 100644 --- a/Telegram/SourceFiles/mtproto/details/mtproto_tls_socket.cpp +++ b/Telegram/SourceFiles/mtproto/details/mtproto_tls_socket.cpp @@ -707,7 +707,7 @@ int64 TlsSocket::read(bytes::span buffer) { if (available <= 0) { return written; } - const auto write = std::min(index_type(available), buffer.size()); + const auto write = std::min(std::size_t(available), buffer.size()); if (write <= 0) { return written; } diff --git a/Telegram/ThirdParty/GSL b/Telegram/ThirdParty/GSL index d846fe50a..1999b48a5 160000 --- a/Telegram/ThirdParty/GSL +++ b/Telegram/ThirdParty/GSL @@ -1 +1 @@ -Subproject commit d846fe50a3f0bb7767c7e087a05f4be95f4da0ec +Subproject commit 1999b48a519196711f0d03af3b7eedd49fcc6db3 diff --git a/Telegram/lib_base b/Telegram/lib_base index f8f796038..d27c3e363 160000 --- a/Telegram/lib_base +++ b/Telegram/lib_base @@ -1 +1 @@ -Subproject commit f8f796038cc936948ef223a22ec548aa63f48aeb +Subproject commit d27c3e363254b169f8886934df8580fdc76d424e