From a091d1d0c44ff4926247a7ab9aa33270f1fd4c53 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 27 Nov 2018 05:06:34 +0300 Subject: [PATCH] Fix AuthKey storer. GitOrigin-RevId: 5b3388ec2a924af487bb70aaa24965330663011c --- td/mtproto/AuthKey.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/td/mtproto/AuthKey.h b/td/mtproto/AuthKey.h index e3809eb61..17a4ec586 100644 --- a/td/mtproto/AuthKey.h +++ b/td/mtproto/AuthKey.h @@ -11,6 +11,7 @@ namespace td { namespace mtproto { + class AuthKey { public: AuthKey() = default; @@ -54,11 +55,11 @@ class AuthKey { auth_key_.clear(); } - enum { AUTH_FLAG = 1, WAS_AUTH_FLAG = 2 }; + enum : int32 { AUTH_FLAG = 1, WAS_AUTH_FLAG = 2 }; template void store(StorerT &storer) const { storer.store_binary(auth_key_id_); - storer.store_binary((auth_flag_ ? AUTH_FLAG : 0) | (was_auth_flag_ ? WAS_AUTH_FLAG : 0)); + storer.store_binary(static_cast((auth_flag_ ? AUTH_FLAG : 0) | (was_auth_flag_ ? WAS_AUTH_FLAG : 0))); storer.store_string(auth_key_); }