[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

@@ -25,7 +25,7 @@ extension FlexBufferVector {
json += "["
for i in 0..<count {
if let val = self[i]?.jsonString() {
let comma = i == count - 1 ? "" : ", "
let comma = i == count &- 1 ? "" : ", "
json += "\(val)\(comma)"
}
}

View File

@@ -52,7 +52,7 @@ extension Map {
json += "{"
for i in 0..<count {
if let key = keys[i]?.cString {
let comma = i == count - 1 ? "" : ", "
let comma = i == count &- 1 ? "" : ", "
let value = values[i]?.jsonString() ?? StaticJSON.null
json += "\"\(key)\": \(value)\(comma)"
}