Skip to content

Commit

Permalink
Remove unused comment and fix typo. (google#8366)
Browse files Browse the repository at this point in the history
* Update NativeObject.swift

Correct the word.

* Update ByteBuffer.swift

Type parameter does not existing, remove it.

* Update ByteBuffer.swift

Correct the word.
  • Loading branch information
lamtrinhdev authored and Jochen Parmentier committed Oct 29, 2024
1 parent 568ac2d commit 4cd48fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions swift/Sources/FlatBuffers/ByteBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions swift/Sources/FlatBuffers/NativeObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: ObjectAPIPacker>(type: T.Type) -> ByteBuffer
Expand All @@ -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
Expand Down

0 comments on commit 4cd48fd

Please sign in to comment.