mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-04 20:31:11 +00:00
Default-empty vectors of enums (#6505)
* disable clippy * Vector of enum default * swift and tests * git clang format * Rewrite enum parser checks * Remove Voids from more_defaults * vector enum swift * remove vector accessor from swift * clang format Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import FlatBuffers
|
||||
|
||||
/// Composite components of Monster color.
|
||||
public enum MyGame_Example_Color: UInt8, Enum {
|
||||
public enum MyGame_Example_Color: UInt8, Enum {
|
||||
public typealias T = UInt8
|
||||
public static var byteSize: Int { return MemoryLayout<UInt8>.size }
|
||||
public var value: UInt8 { return self.rawValue }
|
||||
@@ -21,7 +21,7 @@ public enum MyGame_Example_Color: UInt8, Enum {
|
||||
public static var min: MyGame_Example_Color { return .red }
|
||||
}
|
||||
|
||||
public enum MyGame_Example_Race: Int8, Enum {
|
||||
public enum MyGame_Example_Race: Int8, Enum {
|
||||
public typealias T = Int8
|
||||
public static var byteSize: Int { return MemoryLayout<Int8>.size }
|
||||
public var value: Int8 { return self.rawValue }
|
||||
@@ -35,7 +35,7 @@ public enum MyGame_Example_Race: Int8, Enum {
|
||||
public static var min: MyGame_Example_Race { return .none_ }
|
||||
}
|
||||
|
||||
public enum MyGame_Example_Any_: UInt8, Enum {
|
||||
public enum MyGame_Example_Any_: UInt8, Enum {
|
||||
public typealias T = UInt8
|
||||
public static var byteSize: Int { return MemoryLayout<UInt8>.size }
|
||||
public var value: UInt8 { return self.rawValue }
|
||||
@@ -71,7 +71,7 @@ public struct MyGame_Example_Any_Union {
|
||||
}
|
||||
}
|
||||
}
|
||||
public enum MyGame_Example_AnyUniqueAliases: UInt8, Enum {
|
||||
public enum MyGame_Example_AnyUniqueAliases: UInt8, Enum {
|
||||
public typealias T = UInt8
|
||||
public static var byteSize: Int { return MemoryLayout<UInt8>.size }
|
||||
public var value: UInt8 { return self.rawValue }
|
||||
@@ -107,7 +107,7 @@ public struct MyGame_Example_AnyUniqueAliasesUnion {
|
||||
}
|
||||
}
|
||||
}
|
||||
public enum MyGame_Example_AnyAmbiguousAliases: UInt8, Enum {
|
||||
public enum MyGame_Example_AnyAmbiguousAliases: UInt8, Enum {
|
||||
public typealias T = UInt8
|
||||
public static var byteSize: Int { return MemoryLayout<UInt8>.size }
|
||||
public var value: UInt8 { return self.rawValue }
|
||||
|
||||
Reference in New Issue
Block a user