mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-02 15:08:20 +00:00
[Swift] Moves capacity outside of Storage (#8650)
- Cleans up capacity usage within the lib and moves it outside of the Storage - Use overflow operators
This commit is contained in:
@@ -167,7 +167,7 @@ public struct Table {
|
||||
public func vector(at o: Int32) -> Int32 {
|
||||
var o = o
|
||||
o &+= position
|
||||
return o &+ bb.read(def: Int32.self, position: Int(o)) + 4
|
||||
return o &+ bb.read(def: Int32.self, position: Int(o)) &+ 4
|
||||
}
|
||||
|
||||
/// Reading an indirect offset of a table.
|
||||
@@ -176,7 +176,7 @@ public struct Table {
|
||||
/// - fbb: ByteBuffer
|
||||
/// - Returns: table offset
|
||||
static public func indirect(_ o: Int32, _ fbb: ByteBuffer) -> Int32 {
|
||||
o + fbb.read(def: Int32.self, position: Int(o))
|
||||
o &+ fbb.read(def: Int32.self, position: Int(o))
|
||||
}
|
||||
|
||||
/// Gets a vtable value according to an table Offset and a field offset
|
||||
|
||||
Reference in New Issue
Block a user