mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-04 08:21:11 +00:00
Improves documentation, and adding DocC (#6784)
Finished documenting flatbuffersbuilder Replaces swift 5.5 with 5.2 packages Starts building the tutorial for xcode 13 Finishes building the tutorial for xcode 13 Removes docc files from old swift versions Updates swift style guide
This commit is contained in:
@@ -47,7 +47,9 @@ extension String: Verifiable {
|
||||
|
||||
if !verifier._options._ignoreMissingNullTerminators && !isNullTerminated {
|
||||
let str = verifier._buffer.readString(at: range.start, count: range.count)
|
||||
throw FlatbuffersErrors.missingNullTerminator(position: position, str: str)
|
||||
throw FlatbuffersErrors.missingNullTerminator(
|
||||
position: position,
|
||||
str: str)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,12 +71,18 @@ extension String: FlatbuffersInitializable {
|
||||
|
||||
extension String: ObjectAPIPacker {
|
||||
|
||||
public static func pack(_ builder: inout FlatBufferBuilder, obj: inout String?) -> Offset {
|
||||
public static func pack(
|
||||
_ builder: inout FlatBufferBuilder,
|
||||
obj: inout String?) -> Offset
|
||||
{
|
||||
guard var obj = obj else { return Offset() }
|
||||
return pack(&builder, obj: &obj)
|
||||
}
|
||||
|
||||
public static func pack(_ builder: inout FlatBufferBuilder, obj: inout String) -> Offset {
|
||||
public static func pack(
|
||||
_ builder: inout FlatBufferBuilder,
|
||||
obj: inout String) -> Offset
|
||||
{
|
||||
builder.create(string: obj)
|
||||
}
|
||||
|
||||
@@ -86,7 +94,9 @@ extension String: ObjectAPIPacker {
|
||||
|
||||
extension String: NativeObject {
|
||||
|
||||
public func serialize<T: ObjectAPIPacker>(type: T.Type) -> ByteBuffer where T.T == Self {
|
||||
public func serialize<T: ObjectAPIPacker>(type: T.Type) -> ByteBuffer
|
||||
where T.T == Self
|
||||
{
|
||||
fatalError("serialize should never be called from string directly")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user