[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:
mustiikhalil
2025-07-29 23:21:20 +02:00
committed by GitHub
parent f32a7dcbd2
commit 575d616e60
13 changed files with 121 additions and 110 deletions

View File

@@ -45,7 +45,7 @@ public struct Struct {
/// - o: Current offset of the data
/// - Returns: Data of Type T that conforms to type Scalar
public func readBuffer<T: Scalar>(of type: T.Type, at o: Int32) -> T {
let r = bb.read(def: T.self, position: Int(o + position))
let r = bb.read(def: T.self, position: Int(o &+ position))
return r
}
}