mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-01 16:43:57 +00:00
[swift] Implements union strings (#6589)
This commit is contained in:
@@ -80,12 +80,12 @@ public struct Table {
|
||||
return r
|
||||
}
|
||||
|
||||
public func union<T: FlatBufferObject>(_ o: Int32) -> T {
|
||||
public func union<T: FlatbuffersInitializable>(_ o: Int32) -> T {
|
||||
let o = o + postion
|
||||
return directUnion(o)
|
||||
}
|
||||
|
||||
public func directUnion<T: FlatBufferObject>(_ o: Int32) -> T {
|
||||
public func directUnion<T: FlatbuffersInitializable>(_ o: Int32) -> T {
|
||||
T.init(bb, o: o + bb.read(def: Int32.self, position: Int(o)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user