mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-30 01:11:46 +00:00
Merge branch 'master' of https://github.com/peter-iakovlev/TelegramCore
This commit is contained in:
commit
dd777708d8
@ -1,9 +1,5 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
#if os(macOS)
|
import Postbox
|
||||||
import PostboxMac
|
|
||||||
#else
|
|
||||||
import Postbox
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private enum SentAuthorizationCodeTypeValue: Int32 {
|
private enum SentAuthorizationCodeTypeValue: Int32 {
|
||||||
case otherSession = 0
|
case otherSession = 0
|
||||||
|
@ -11,8 +11,8 @@ private func hashForIdsReverse(_ ids: [Int64]) -> Int32 {
|
|||||||
var acc: UInt32 = 0
|
var acc: UInt32 = 0
|
||||||
|
|
||||||
for id in ids {
|
for id in ids {
|
||||||
let low = UInt32(UInt64(bitPattern: id) & UInt64(0xffffffff))
|
let low = UInt32(UInt64(bitPattern: id) & (0xffffffff as UInt64))
|
||||||
let high = UInt32((UInt64(bitPattern: id) >> 32) & UInt64(0xffffffff))
|
let high = UInt32((UInt64(bitPattern: id) >> 32) & (0xffffffff as UInt64))
|
||||||
|
|
||||||
acc = (acc &* 20261) &+ high
|
acc = (acc &* 20261) &+ high
|
||||||
acc = (acc &* 20261) &+ low
|
acc = (acc &* 20261) &+ low
|
||||||
|
Loading…
x
Reference in New Issue
Block a user