mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-16 17:22:21 +00:00
Make Monster's Color unsigned (#5318)
- update C++ monster_test::Color to unsigned type - update Go Color:ubyte in the go_test.go - add workaround for unsigned enum in java test - sync generate.bat and generate.sh
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
b701c7d56e
commit
f9ebfcb9c4
@@ -48,10 +48,10 @@ func (rcv *Vec3) MutateTest1(n float64) bool {
|
||||
}
|
||||
|
||||
func (rcv *Vec3) Test2() Color {
|
||||
return rcv._tab.GetInt8(rcv._tab.Pos + flatbuffers.UOffsetT(24))
|
||||
return rcv._tab.GetByte(rcv._tab.Pos + flatbuffers.UOffsetT(24))
|
||||
}
|
||||
func (rcv *Vec3) MutateTest2(n Color) bool {
|
||||
return rcv._tab.MutateInt8(rcv._tab.Pos+flatbuffers.UOffsetT(24), n)
|
||||
return rcv._tab.MutateByte(rcv._tab.Pos+flatbuffers.UOffsetT(24), n)
|
||||
}
|
||||
|
||||
func (rcv *Vec3) Test3(obj *Test) *Test {
|
||||
@@ -62,7 +62,7 @@ func (rcv *Vec3) Test3(obj *Test) *Test {
|
||||
return obj
|
||||
}
|
||||
|
||||
func CreateVec3(builder *flatbuffers.Builder, x float32, y float32, z float32, test1 float64, test2 int8, test3_a int16, test3_b int8) flatbuffers.UOffsetT {
|
||||
func CreateVec3(builder *flatbuffers.Builder, x float32, y float32, z float32, test1 float64, test2 byte, test3_a int16, test3_b int8) flatbuffers.UOffsetT {
|
||||
builder.Prep(8, 32)
|
||||
builder.Pad(2)
|
||||
builder.Prep(2, 4)
|
||||
@@ -70,7 +70,7 @@ func CreateVec3(builder *flatbuffers.Builder, x float32, y float32, z float32, t
|
||||
builder.PrependInt8(test3_b)
|
||||
builder.PrependInt16(test3_a)
|
||||
builder.Pad(1)
|
||||
builder.PrependInt8(test2)
|
||||
builder.PrependByte(test2)
|
||||
builder.PrependFloat64(test1)
|
||||
builder.Pad(4)
|
||||
builder.PrependFloat32(z)
|
||||
|
||||
Reference in New Issue
Block a user