mirror of
https://github.com/google/flatbuffers.git
synced 2025-04-08 09:12:14 +08:00
More missing version changes
This commit is contained in:
parent
5c01ad387f
commit
a9a295fecf
@ -37,7 +37,7 @@ class Animal : Table() {
|
||||
return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u
|
||||
}
|
||||
companion object {
|
||||
fun validateVersion() = Constants.FLATBUFFERS_1_12_0()
|
||||
fun validateVersion() = Constants.FLATBUFFERS_2_0_0()
|
||||
fun getRootAsAnimal(_bb: ByteBuffer): Animal = getRootAsAnimal(_bb, Animal())
|
||||
fun getRootAsAnimal(_bb: ByteBuffer, obj: Animal): Animal {
|
||||
_bb.order(ByteOrder.LITTLE_ENDIAN)
|
||||
|
@ -6,7 +6,7 @@ import FlatBuffers
|
||||
|
||||
public struct models_HelloReply: FlatBufferObject {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_1_12_0() }
|
||||
static func validateVersion() { FlatBuffersVersion_2_0_0() }
|
||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||
private var _accessor: Table
|
||||
|
||||
@ -38,7 +38,7 @@ public struct models_HelloReply: FlatBufferObject {
|
||||
|
||||
public struct models_HelloRequest: FlatBufferObject {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_1_12_0() }
|
||||
static func validateVersion() { FlatBuffersVersion_2_0_0() }
|
||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||
private var _accessor: Table
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "flatbuffers"
|
||||
version = "2.0.0"
|
||||
edition = "2021"
|
||||
edition = "2018"
|
||||
authors = ["Robert Winslow <hello@rwinslow.com>", "FlatBuffers Maintainers"]
|
||||
license = "Apache-2.0"
|
||||
description = "Official FlatBuffers Rust runtime library."
|
||||
|
@ -11,7 +11,7 @@ public enum MyGame_Sample_Color: Int8, Enum {
|
||||
case red = 0
|
||||
case green = 1
|
||||
case blue = 2
|
||||
|
||||
|
||||
|
||||
public static var max: MyGame_Sample_Color { return .blue }
|
||||
public static var min: MyGame_Sample_Color { return .red }
|
||||
@ -23,7 +23,7 @@ public enum MyGame_Sample_Equipment: UInt8, Enum {
|
||||
public var value: UInt8 { return self.rawValue }
|
||||
case none_ = 0
|
||||
case weapon = 1
|
||||
|
||||
|
||||
|
||||
public static var max: MyGame_Sample_Equipment { return .weapon }
|
||||
public static var min: MyGame_Sample_Equipment { return .none_ }
|
||||
@ -31,7 +31,7 @@ public enum MyGame_Sample_Equipment: UInt8, Enum {
|
||||
|
||||
public struct MyGame_Sample_Vec3: NativeStruct {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_1_12_0() }
|
||||
static func validateVersion() { FlatBuffersVersion_2_0_0() }
|
||||
|
||||
private var _x: Float32
|
||||
private var _y: Float32
|
||||
@ -56,7 +56,7 @@ public struct MyGame_Sample_Vec3: NativeStruct {
|
||||
|
||||
public struct MyGame_Sample_Vec3_Mutable: FlatBufferObject {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_1_12_0() }
|
||||
static func validateVersion() { FlatBuffersVersion_2_0_0() }
|
||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||
private var _accessor: Struct
|
||||
|
||||
@ -72,7 +72,7 @@ public struct MyGame_Sample_Vec3_Mutable: FlatBufferObject {
|
||||
|
||||
public struct MyGame_Sample_Monster: FlatBufferObject {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_1_12_0() }
|
||||
static func validateVersion() { FlatBuffersVersion_2_0_0() }
|
||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||
private var _accessor: Table
|
||||
|
||||
@ -162,7 +162,7 @@ public struct MyGame_Sample_Monster: FlatBufferObject {
|
||||
|
||||
public struct MyGame_Sample_Weapon: FlatBufferObject {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_1_12_0() }
|
||||
static func validateVersion() { FlatBuffersVersion_2_0_0() }
|
||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||
private var _accessor: Table
|
||||
|
||||
|
@ -4,14 +4,14 @@ import FlatBuffers
|
||||
|
||||
public struct Property: NativeStruct {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_1_12_0() }
|
||||
static func validateVersion() { FlatBuffersVersion_2_0_0() }
|
||||
|
||||
public var property: Bool
|
||||
}
|
||||
|
||||
public struct Property_Mutable: FlatBufferObject {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_1_12_0() }
|
||||
static func validateVersion() { FlatBuffersVersion_2_0_0() }
|
||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||
private var _accessor: Struct
|
||||
|
||||
@ -25,7 +25,7 @@ public struct Property_Mutable: FlatBufferObject {
|
||||
|
||||
public struct TestMutatingBool: FlatBufferObject {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_1_12_0() }
|
||||
static func validateVersion() { FlatBuffersVersion_2_0_0() }
|
||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||
private var _accessor: Table
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user