From 7d2c5faf6d1a7ec3b218b66b24e1d8a087bb2b96 Mon Sep 17 00:00:00 2001 From: "LamTrinh.Dev" Date: Sun, 28 Jul 2024 00:07:30 +0700 Subject: [PATCH 1/3] Update NativeObject.swift Correct the word. --- swift/Sources/FlatBuffers/NativeObject.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swift/Sources/FlatBuffers/NativeObject.swift b/swift/Sources/FlatBuffers/NativeObject.swift index 318896cc06a..2ed83970fff 100644 --- a/swift/Sources/FlatBuffers/NativeObject.swift +++ b/swift/Sources/FlatBuffers/NativeObject.swift @@ -23,7 +23,7 @@ public protocol NativeObject {} extension NativeObject { - /// Serialize is a helper function that serailizes the data from the Object API to a bytebuffer directly th + /// Serialize is a helper function that serializes the data from the Object API to a bytebuffer directly th /// - Parameter type: Type of the Flatbuffer object /// - Returns: returns the encoded sized ByteBuffer public func serialize(type: T.Type) -> ByteBuffer @@ -33,7 +33,7 @@ extension NativeObject { return serialize(builder: &builder, type: type.self) } - /// Serialize is a helper function that serailizes the data from the Object API to a bytebuffer directly. + /// Serialize is a helper function that serializes the data from the Object API to a bytebuffer directly. /// /// - Parameters: /// - builder: A FlatBufferBuilder From 8afc2d8c1d9f00d7114067e1a65082b2d53d29a6 Mon Sep 17 00:00:00 2001 From: "LamTrinh.Dev" Date: Sun, 28 Jul 2024 00:19:33 +0700 Subject: [PATCH 2/3] Update ByteBuffer.swift Type parameter does not existing, remove it. --- swift/Sources/FlatBuffers/ByteBuffer.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/swift/Sources/FlatBuffers/ByteBuffer.swift b/swift/Sources/FlatBuffers/ByteBuffer.swift index f8de2ca7475..5b76afd3e71 100644 --- a/swift/Sources/FlatBuffers/ByteBuffer.swift +++ b/swift/Sources/FlatBuffers/ByteBuffer.swift @@ -474,7 +474,6 @@ public struct ByteBuffer { /// - Parameters: /// - index: index of the string in the buffer /// - count: length of the string - /// - type: Encoding of the string @inline(__always) public func readString( at index: Int, From 316baf91a6b7cf8dcf3d7fc8e386773880b20f4d Mon Sep 17 00:00:00 2001 From: "LamTrinh.Dev" Date: Sun, 28 Jul 2024 00:22:14 +0700 Subject: [PATCH 3/3] Update ByteBuffer.swift Correct the word. --- swift/Sources/FlatBuffers/ByteBuffer.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/Sources/FlatBuffers/ByteBuffer.swift b/swift/Sources/FlatBuffers/ByteBuffer.swift index 5b76afd3e71..5debd01e99f 100644 --- a/swift/Sources/FlatBuffers/ByteBuffer.swift +++ b/swift/Sources/FlatBuffers/ByteBuffer.swift @@ -100,7 +100,7 @@ public struct ByteBuffer { /// The size of the elements written to the buffer + their paddings private var _writerSize: Int = 0 - /// Aliginment of the current memory being written to the buffer + /// Alignment of the current memory being written to the buffer var alignment = 1 /// Current Index which is being used to write to the buffer, it is written from the end to the start of the buffer var writerIndex: Int { _storage.capacity &- _writerSize }