mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix GenerateLocalization for Swift 4.2
This commit is contained in:
parent
ec4dbf60ec
commit
c9e1e11ce7
1 changed files with 4 additions and 6 deletions
|
|
@ -186,12 +186,10 @@ final class WriteBuffer {
|
|||
}
|
||||
|
||||
func append(_ value: Int32) {
|
||||
let ptr = self.data.count
|
||||
self.data.count += 4
|
||||
self.data.withUnsafeMutableBytes { (bytes: UnsafeMutablePointer<Int8>) -> Void in
|
||||
var value = value
|
||||
memcpy(bytes.advanced(by: ptr), &value, 4)
|
||||
}
|
||||
var value = value
|
||||
withUnsafePointer(to: &value, { (pointer: UnsafePointer<Int32>) -> Void in
|
||||
self.data.append(UnsafeRawPointer(pointer).assumingMemoryBound(to: UInt8.self), count: 4)
|
||||
})
|
||||
}
|
||||
|
||||
func append(_ string: String) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue