mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 22:10:01 +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:
@@ -49,7 +49,7 @@ extension Mutable where Self == Table {
|
||||
/// - index: index of the Element
|
||||
public func mutate<T: Scalar>(_ value: T, index: Int32) -> Bool {
|
||||
guard index != 0 else { return false }
|
||||
return mutate(value: value, o: index + position)
|
||||
return mutate(value: value, o: index &+ position)
|
||||
}
|
||||
|
||||
/// Directly mutates the element by calling mutate
|
||||
@@ -70,7 +70,7 @@ extension Mutable where Self == Struct {
|
||||
/// - value: New value to be inserted to the buffer
|
||||
/// - index: index of the Element
|
||||
public func mutate<T: Scalar>(_ value: T, index: Int32) -> Bool {
|
||||
mutate(value: value, o: index + position)
|
||||
mutate(value: value, o: index &+ position)
|
||||
}
|
||||
|
||||
/// Directly mutates the element by calling mutate
|
||||
|
||||
Reference in New Issue
Block a user