From c5b32c53efbc1481f3942d28ef7e4f5eaca5df1f Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 19 Jul 2022 22:37:09 +0300 Subject: [PATCH] Respect kSetVersion in default set cache key. --- ui/emoji_config.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ui/emoji_config.cpp b/ui/emoji_config.cpp index 189f10f..88ae330 100644 --- a/ui/emoji_config.cpp +++ b/ui/emoji_config.cpp @@ -124,12 +124,9 @@ uint32 ComputeVersion(int id) { static_assert(kCacheVersion > 0 && kCacheVersion < (1 << 16)); static_assert(kSetVersion > 0 && kSetVersion < (1 << 8)); - auto result = uint32(kCacheVersion); - if (!id) { - return result; - } - result |= (uint32(id) << 24) | (uint32(kSetVersion) << 16); - return result; + return uint32(kCacheVersion) + | (uint32(kSetVersion) << 16) + | (uint32(id) << 24); } int ReadCurrentSetId() {