Skip to content

Commit ed50aa5

Browse files
committed
Fixes spelling mistake in the word position
1 parent c7a8102 commit ed50aa5

File tree

12 files changed

+57
-59
lines changed

12 files changed

+57
-59
lines changed

samples/monster_generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public struct MyGame_Sample_Monster: FlatBufferObject, Verifiable {
111111
}
112112

113113
public var pos: MyGame_Sample_Vec3? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : _accessor.readBuffer(of: MyGame_Sample_Vec3.self, at: o) }
114-
public var mutablePos: MyGame_Sample_Vec3_Mutable? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : MyGame_Sample_Vec3_Mutable(_accessor.bb, o: o + _accessor.postion) }
114+
public var mutablePos: MyGame_Sample_Vec3_Mutable? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : MyGame_Sample_Vec3_Mutable(_accessor.bb, o: o + _accessor.position) }
115115
public var mana: Int16 { let o = _accessor.offset(VTOFFSET.mana.v); return o == 0 ? 150 : _accessor.readBuffer(of: Int16.self, at: o) }
116116
@discardableResult public func mutate(mana: Int16) -> Bool {let o = _accessor.offset(VTOFFSET.mana.v); return _accessor.mutate(mana, index: o) }
117117
public var hp: Int16 { let o = _accessor.offset(VTOFFSET.hp.v); return o == 0 ? 100 : _accessor.readBuffer(of: Int16.self, at: o) }

src/idl_gen_swift.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class SwiftGenerator : public BaseGenerator {
328328
} else {
329329
code_ +=
330330
"_{{FIELDVAR}} = {{VALUETYPE}}({{ACCESS}}.bb, o: "
331-
"{{ACCESS}}.postion + {{OFFSET}})";
331+
"{{ACCESS}}.position + {{OFFSET}})";
332332
}
333333
}
334334
Outdent();
@@ -361,7 +361,7 @@ class SwiftGenerator : public BaseGenerator {
361361
} else if (IsStruct(field.value.type)) {
362362
code_.SetValue("VALUETYPE", GenType(field.value.type) + Mutable());
363363
code_ += GenReaderMainBody() + "return " +
364-
GenConstructor("{{ACCESS}}.postion + {{OFFSET}}");
364+
GenConstructor("{{ACCESS}}.position + {{OFFSET}}");
365365
}
366366
if (parser_.opts.mutable_buffer && !IsStruct(field.value.type))
367367
code_ += GenMutate("{{OFFSET}}", "", IsEnum(field.value.type));
@@ -754,7 +754,7 @@ class SwiftGenerator : public BaseGenerator {
754754
code_.SetValue("VALUETYPE", GenType(field.value.type) + Mutable());
755755
code_.SetValue("CONSTANT", "nil");
756756
code_ += GenReaderMainBody(is_required) + GenOffset() + required_reader +
757-
GenConstructor("o + {{ACCESS}}.postion");
757+
GenConstructor("o + {{ACCESS}}.position");
758758
return;
759759
}
760760
switch (field.value.type.base_type) {
@@ -763,7 +763,7 @@ class SwiftGenerator : public BaseGenerator {
763763
code_.SetValue("CONSTANT", "nil");
764764
code_ += GenReaderMainBody(is_required) + GenOffset() +
765765
required_reader +
766-
GenConstructor(GenIndirect("o + {{ACCESS}}.postion"));
766+
GenConstructor(GenIndirect("o + {{ACCESS}}.position"));
767767
break;
768768

769769
case BASE_TYPE_STRING: {

swift/Sources/FlatBuffers/FlatBufferBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ public struct FlatBufferBuilder {
811811
/// *NOTE: Never call this manually*
812812
///
813813
/// - Parameter element: Element to insert
814-
/// - returns: Postion of the Element
814+
/// - returns: position of the Element
815815
@inline(__always)
816816
@discardableResult
817817
mutating public func push<T: Scalar>(element: T) -> UOffset {

swift/Sources/FlatBuffers/Mutable.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public protocol Mutable {
2121
/// makes Flatbuffer accessed within the Protocol
2222
var bb: ByteBuffer { get }
2323
/// makes position of the ``Table``/``Struct`` accessed within the Protocol
24-
var postion: Int32 { get }
24+
var position: Int32 { get }
2525
}
2626

2727
extension Mutable {
@@ -45,7 +45,7 @@ extension Mutable where Self == Table {
4545
/// - index: index of the Element
4646
public func mutate<T: Scalar>(_ value: T, index: Int32) -> Bool {
4747
guard index != 0 else { return false }
48-
return mutate(value: value, o: index + postion)
48+
return mutate(value: value, o: index + position)
4949
}
5050

5151
/// Directly mutates the element by calling mutate
@@ -66,7 +66,7 @@ extension Mutable where Self == Struct {
6666
/// - value: New value to be inserted to the buffer
6767
/// - index: index of the Element
6868
public func mutate<T: Scalar>(_ value: T, index: Int32) -> Bool {
69-
mutate(value: value, o: index + postion)
69+
mutate(value: value, o: index + position)
7070
}
7171

7272
/// Directly mutates the element by calling mutate

swift/Sources/FlatBuffers/Struct.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ public struct Struct {
2424
/// Hosting Bytebuffer
2525
public private(set) var bb: ByteBuffer
2626
/// Current position of the struct
27-
public private(set) var postion: Int32
27+
public private(set) var position: Int32
2828

2929
/// Initializer for a mutable flatbuffers struct
3030
/// - Parameters:
3131
/// - bb: Current hosting Bytebuffer
3232
/// - position: Current position for the struct in the ByteBuffer
3333
public init(bb: ByteBuffer, position: Int32 = 0) {
3434
self.bb = bb
35-
postion = position
35+
self.position = position
3636
}
3737

3838
/// Reads data from the buffer directly at offset O
@@ -41,7 +41,7 @@ public struct Struct {
4141
/// - o: Current offset of the data
4242
/// - Returns: Data of Type T that conforms to type Scalar
4343
public func readBuffer<T: Scalar>(of type: T.Type, at o: Int32) -> T {
44-
let r = bb.read(def: T.self, position: Int(o + postion))
44+
let r = bb.read(def: T.self, position: Int(o + position))
4545
return r
4646
}
4747
}

swift/Sources/FlatBuffers/Table.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public struct Table {
2424
/// Hosting Bytebuffer
2525
public private(set) var bb: ByteBuffer
2626
/// Current position of the table within the buffer
27-
public private(set) var postion: Int32
27+
public private(set) var position: Int32
2828

2929
/// Initializer for the table interface to allow generated code to read
3030
/// data from memory
@@ -38,15 +38,15 @@ public struct Table {
3838
"Reading/Writing a buffer in big endian machine is not supported on swift")
3939
}
4040
self.bb = bb
41-
postion = position
41+
self.position = position
4242
}
4343

4444
/// Gets the offset of the current field within the buffer by reading
4545
/// the vtable
4646
/// - Parameter o: current offset
4747
/// - Returns: offset of field within buffer
4848
public func offset(_ o: Int32) -> Int32 {
49-
let vtable = postion - bb.read(def: Int32.self, position: Int(postion))
49+
let vtable = position - bb.read(def: Int32.self, position: Int(position))
5050
return o < bb
5151
.read(def: VOffset.self, position: Int(vtable)) ? Int32(bb.read(
5252
def: Int16.self,
@@ -64,7 +64,7 @@ public struct Table {
6464
/// String reads from the buffer with respect to position of the current table.
6565
/// - Parameter offset: Offset of the string
6666
public func string(at offset: Int32) -> String? {
67-
directString(at: offset + postion)
67+
directString(at: offset + position)
6868
}
6969

7070
/// Direct string reads from the buffer disregarding the position of the table.
@@ -84,7 +84,7 @@ public struct Table {
8484
/// - type: Type of Element that needs to be read from the buffer
8585
/// - o: Offset of the Element
8686
public func readBuffer<T>(of type: T.Type, at o: Int32) -> T {
87-
directRead(of: T.self, offset: o + postion)
87+
directRead(of: T.self, offset: o + position)
8888
}
8989

9090
/// Reads from the buffer disregarding the position of the table.
@@ -110,7 +110,7 @@ public struct Table {
110110
/// - Parameter o: offset
111111
/// - Returns: A flatbuffers object
112112
public func union<T: FlatbuffersInitializable>(_ o: Int32) -> T {
113-
let o = o + postion
113+
let o = o + position
114114
return directUnion(o)
115115
}
116116

@@ -136,7 +136,7 @@ public struct Table {
136136
/// - returns: Count of elements
137137
public func vector(count o: Int32) -> Int32 {
138138
var o = o
139-
o += postion
139+
o += position
140140
o += bb.read(def: Int32.self, position: Int(o))
141141
return bb.read(def: Int32.self, position: Int(o))
142142
}
@@ -146,7 +146,7 @@ public struct Table {
146146
/// - returns: the start index of the vector
147147
public func vector(at o: Int32) -> Int32 {
148148
var o = o
149-
o += postion
149+
o += position
150150
return o + bb.read(def: Int32.self, position: Int(o)) + 4
151151
}
152152

swift/Sources/FlatBuffers/Verifier.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public struct Verifier {
8989

9090
/// Checks if the value of Size "X" is within the range of the buffer
9191
/// - Parameters:
92-
/// - position: Current postion to be read
92+
/// - position: Current position to be read
9393
/// - size: `Byte` Size of readable object within the buffer
9494
/// - Throws: `outOfBounds` if the value is out of the bounds of the buffer
9595
/// and `apparentSizeTooLarge` if the apparent size is bigger than the one specified

tests/swift/Wasm.tests/Tests/FlatBuffers.Test.Swift.WasmTests/monster_test_generated.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public struct MyGame_Example_Vec3: NativeStruct, Verifiable, FlatbuffersInitiali
337337
_z = _accessor.readBuffer(of: Float32.self, at: 8)
338338
_test1 = _accessor.readBuffer(of: Double.self, at: 16)
339339
_test2 = _accessor.readBuffer(of: UInt8.self, at: 24)
340-
_test3 = MyGame_Example_Test(_accessor.bb, o: _accessor.postion + 26)
340+
_test3 = MyGame_Example_Test(_accessor.bb, o: _accessor.position + 26)
341341
}
342342

343343
public init(x: Float32, y: Float32, z: Float32, test1: Double, test2: MyGame_Example_Color, test3: MyGame_Example_Test) {
@@ -429,7 +429,7 @@ public struct MyGame_Example_Vec3_Mutable: FlatBufferObject {
429429
@discardableResult public func mutate(test1: Double) -> Bool { return _accessor.mutate(test1, index: 16) }
430430
public var test2: MyGame_Example_Color { return MyGame_Example_Color(rawValue: _accessor.readBuffer(of: UInt8.self, at: 24)) ?? .red }
431431
@discardableResult public func mutate(test2: MyGame_Example_Color) -> Bool { return _accessor.mutate(test2.rawValue, index: 24) }
432-
public var test3: MyGame_Example_Test_Mutable { return MyGame_Example_Test_Mutable(_accessor.bb, o: _accessor.postion + 26) }
432+
public var test3: MyGame_Example_Test_Mutable { return MyGame_Example_Test_Mutable(_accessor.bb, o: _accessor.position + 26) }
433433

434434

435435
public mutating func unpack() -> MyGame_Example_Vec3 {
@@ -535,9 +535,9 @@ public struct MyGame_Example_StructOfStructs: NativeStruct, Verifiable, Flatbuff
535535

536536
public init(_ bb: ByteBuffer, o: Int32) {
537537
let _accessor = Struct(bb: bb, position: o)
538-
_a = MyGame_Example_Ability(_accessor.bb, o: _accessor.postion + 0)
539-
_b = MyGame_Example_Test(_accessor.bb, o: _accessor.postion + 8)
540-
_c = MyGame_Example_Ability(_accessor.bb, o: _accessor.postion + 12)
538+
_a = MyGame_Example_Ability(_accessor.bb, o: _accessor.position + 0)
539+
_b = MyGame_Example_Test(_accessor.bb, o: _accessor.position + 8)
540+
_c = MyGame_Example_Ability(_accessor.bb, o: _accessor.position + 12)
541541
}
542542

543543
public init(a: MyGame_Example_Ability, b: MyGame_Example_Test, c: MyGame_Example_Ability) {
@@ -593,9 +593,9 @@ public struct MyGame_Example_StructOfStructs_Mutable: FlatBufferObject {
593593

594594
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
595595

596-
public var a: MyGame_Example_Ability_Mutable { return MyGame_Example_Ability_Mutable(_accessor.bb, o: _accessor.postion + 0) }
597-
public var b: MyGame_Example_Test_Mutable { return MyGame_Example_Test_Mutable(_accessor.bb, o: _accessor.postion + 8) }
598-
public var c: MyGame_Example_Ability_Mutable { return MyGame_Example_Ability_Mutable(_accessor.bb, o: _accessor.postion + 12) }
596+
public var a: MyGame_Example_Ability_Mutable { return MyGame_Example_Ability_Mutable(_accessor.bb, o: _accessor.position + 0) }
597+
public var b: MyGame_Example_Test_Mutable { return MyGame_Example_Test_Mutable(_accessor.bb, o: _accessor.position + 8) }
598+
public var c: MyGame_Example_Ability_Mutable { return MyGame_Example_Ability_Mutable(_accessor.bb, o: _accessor.position + 12) }
599599

600600

601601
public mutating func unpack() -> MyGame_Example_StructOfStructs {
@@ -619,7 +619,7 @@ public struct MyGame_Example_StructOfStructsOfStructs: NativeStruct, Verifiable,
619619

620620
public init(_ bb: ByteBuffer, o: Int32) {
621621
let _accessor = Struct(bb: bb, position: o)
622-
_a = MyGame_Example_StructOfStructs(_accessor.bb, o: _accessor.postion + 0)
622+
_a = MyGame_Example_StructOfStructs(_accessor.bb, o: _accessor.position + 0)
623623
}
624624

625625
public init(a: MyGame_Example_StructOfStructs) {
@@ -661,7 +661,7 @@ public struct MyGame_Example_StructOfStructsOfStructs_Mutable: FlatBufferObject
661661

662662
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
663663

664-
public var a: MyGame_Example_StructOfStructs_Mutable { return MyGame_Example_StructOfStructs_Mutable(_accessor.bb, o: _accessor.postion + 0) }
664+
public var a: MyGame_Example_StructOfStructs_Mutable { return MyGame_Example_StructOfStructs_Mutable(_accessor.bb, o: _accessor.position + 0) }
665665

666666

667667
public mutating func unpack() -> MyGame_Example_StructOfStructsOfStructs {
@@ -1185,7 +1185,7 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac
11851185
}
11861186

11871187
public var pos: MyGame_Example_Vec3? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : _accessor.readBuffer(of: MyGame_Example_Vec3.self, at: o) }
1188-
public var mutablePos: MyGame_Example_Vec3_Mutable? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : MyGame_Example_Vec3_Mutable(_accessor.bb, o: o + _accessor.postion) }
1188+
public var mutablePos: MyGame_Example_Vec3_Mutable? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : MyGame_Example_Vec3_Mutable(_accessor.bb, o: o + _accessor.position) }
11891189
public var mana: Int16 { let o = _accessor.offset(VTOFFSET.mana.v); return o == 0 ? 150 : _accessor.readBuffer(of: Int16.self, at: o) }
11901190
@discardableResult public func mutate(mana: Int16) -> Bool {let o = _accessor.offset(VTOFFSET.mana.v); return _accessor.mutate(mana, index: o) }
11911191
public var hp: Int16 { let o = _accessor.offset(VTOFFSET.hp.v); return o == 0 ? 100 : _accessor.readBuffer(of: Int16.self, at: o) }
@@ -1214,13 +1214,13 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac
12141214
public var testarrayoftablesCount: Int32 { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? 0 : _accessor.vector(count: o) }
12151215
public func testarrayoftables(at index: Int32) -> MyGame_Example_Monster? { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? nil : MyGame_Example_Monster(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
12161216
public func testarrayoftablesBy(key: String) -> MyGame_Example_Monster? { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? nil : MyGame_Example_Monster.lookupByKey(vector: _accessor.vector(at: o), key: key, fbb: _accessor.bb) }
1217-
public var enemy: MyGame_Example_Monster? { let o = _accessor.offset(VTOFFSET.enemy.v); return o == 0 ? nil : MyGame_Example_Monster(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
1217+
public var enemy: MyGame_Example_Monster? { let o = _accessor.offset(VTOFFSET.enemy.v); return o == 0 ? nil : MyGame_Example_Monster(_accessor.bb, o: _accessor.indirect(o + _accessor.position)) }
12181218
public var hasTestnestedflatbuffer: Bool { let o = _accessor.offset(VTOFFSET.testnestedflatbuffer.v); return o == 0 ? false : true }
12191219
public var testnestedflatbufferCount: Int32 { let o = _accessor.offset(VTOFFSET.testnestedflatbuffer.v); return o == 0 ? 0 : _accessor.vector(count: o) }
12201220
public func testnestedflatbuffer(at index: Int32) -> UInt8 { let o = _accessor.offset(VTOFFSET.testnestedflatbuffer.v); return o == 0 ? 0 : _accessor.directRead(of: UInt8.self, offset: _accessor.vector(at: o) + index * 1) }
12211221
public var testnestedflatbuffer: [UInt8] { return _accessor.getVector(at: VTOFFSET.testnestedflatbuffer.v) ?? [] }
12221222
public func mutate(testnestedflatbuffer: UInt8, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.testnestedflatbuffer.v); return _accessor.directMutate(testnestedflatbuffer, index: _accessor.vector(at: o) + index * 1) }
1223-
public var testempty: MyGame_Example_Stat? { let o = _accessor.offset(VTOFFSET.testempty.v); return o == 0 ? nil : MyGame_Example_Stat(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
1223+
public var testempty: MyGame_Example_Stat? { let o = _accessor.offset(VTOFFSET.testempty.v); return o == 0 ? nil : MyGame_Example_Stat(_accessor.bb, o: _accessor.indirect(o + _accessor.position)) }
12241224
public var testbool: Bool { let o = _accessor.offset(VTOFFSET.testbool.v); return o == 0 ? false : _accessor.readBuffer(of: Bool.self, at: o) }
12251225
@discardableResult public func mutate(testbool: Bool) -> Bool {let o = _accessor.offset(VTOFFSET.testbool.v); return _accessor.mutate(testbool, index: o) }
12261226
public var testhashs32Fnv1: Int32 { let o = _accessor.offset(VTOFFSET.testhashs32Fnv1.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int32.self, at: o) }
@@ -1276,7 +1276,7 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac
12761276
public func vectorOfDoubles(at index: Int32) -> Double { let o = _accessor.offset(VTOFFSET.vectorOfDoubles.v); return o == 0 ? 0 : _accessor.directRead(of: Double.self, offset: _accessor.vector(at: o) + index * 8) }
12771277
public var vectorOfDoubles: [Double] { return _accessor.getVector(at: VTOFFSET.vectorOfDoubles.v) ?? [] }
12781278
public func mutate(vectorOfDoubles: Double, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.vectorOfDoubles.v); return _accessor.directMutate(vectorOfDoubles, index: _accessor.vector(at: o) + index * 8) }
1279-
public var parentNamespaceTest: MyGame_InParentNamespace? { let o = _accessor.offset(VTOFFSET.parentNamespaceTest.v); return o == 0 ? nil : MyGame_InParentNamespace(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
1279+
public var parentNamespaceTest: MyGame_InParentNamespace? { let o = _accessor.offset(VTOFFSET.parentNamespaceTest.v); return o == 0 ? nil : MyGame_InParentNamespace(_accessor.bb, o: _accessor.indirect(o + _accessor.position)) }
12801280
public var hasVectorOfReferrables: Bool { let o = _accessor.offset(VTOFFSET.vectorOfReferrables.v); return o == 0 ? false : true }
12811281
public var vectorOfReferrablesCount: Int32 { let o = _accessor.offset(VTOFFSET.vectorOfReferrables.v); return o == 0 ? 0 : _accessor.vector(count: o) }
12821282
public func vectorOfReferrables(at index: Int32) -> MyGame_Example_Referrable? { let o = _accessor.offset(VTOFFSET.vectorOfReferrables.v); return o == 0 ? nil : MyGame_Example_Referrable(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
@@ -1325,7 +1325,7 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac
13251325
public func scalarKeySortedTables(at index: Int32) -> MyGame_Example_Stat? { let o = _accessor.offset(VTOFFSET.scalarKeySortedTables.v); return o == 0 ? nil : MyGame_Example_Stat(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
13261326
public func scalarKeySortedTablesBy(key: UInt16) -> MyGame_Example_Stat? { let o = _accessor.offset(VTOFFSET.scalarKeySortedTables.v); return o == 0 ? nil : MyGame_Example_Stat.lookupByKey(vector: _accessor.vector(at: o), key: key, fbb: _accessor.bb) }
13271327
public var nativeInline: MyGame_Example_Test? { let o = _accessor.offset(VTOFFSET.nativeInline.v); return o == 0 ? nil : _accessor.readBuffer(of: MyGame_Example_Test.self, at: o) }
1328-
public var mutableNativeInline: MyGame_Example_Test_Mutable? { let o = _accessor.offset(VTOFFSET.nativeInline.v); return o == 0 ? nil : MyGame_Example_Test_Mutable(_accessor.bb, o: o + _accessor.postion) }
1328+
public var mutableNativeInline: MyGame_Example_Test_Mutable? { let o = _accessor.offset(VTOFFSET.nativeInline.v); return o == 0 ? nil : MyGame_Example_Test_Mutable(_accessor.bb, o: o + _accessor.position) }
13291329
public var longEnumNonEnumDefault: MyGame_Example_LongEnum { let o = _accessor.offset(VTOFFSET.longEnumNonEnumDefault.v); return o == 0 ? .longone : MyGame_Example_LongEnum(rawValue: _accessor.readBuffer(of: UInt64.self, at: o)) ?? .longone }
13301330
@discardableResult public func mutate(longEnumNonEnumDefault: MyGame_Example_LongEnum) -> Bool {let o = _accessor.offset(VTOFFSET.longEnumNonEnumDefault.v); return _accessor.mutate(longEnumNonEnumDefault.rawValue, index: o) }
13311331
public var longEnumNormalDefault: MyGame_Example_LongEnum { let o = _accessor.offset(VTOFFSET.longEnumNormalDefault.v); return o == 0 ? .longone : MyGame_Example_LongEnum(rawValue: _accessor.readBuffer(of: UInt64.self, at: o)) ?? .longone }

0 commit comments

Comments
 (0)