mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-04 20:48:59 +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,12 +48,12 @@ class TestSimpleTableWithEnum extends Table
|
||||
}
|
||||
|
||||
/**
|
||||
* @return sbyte
|
||||
* @return byte
|
||||
*/
|
||||
public function getColor()
|
||||
{
|
||||
$o = $this->__offset(4);
|
||||
return $o != 0 ? $this->bb->getSbyte($o + $this->bb_pos) : \MyGame\Example\Color::Green;
|
||||
return $o != 0 ? $this->bb->getByte($o + $this->bb_pos) : \MyGame\Example\Color::Green;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,12 +79,12 @@ class TestSimpleTableWithEnum extends Table
|
||||
|
||||
/**
|
||||
* @param FlatBufferBuilder $builder
|
||||
* @param sbyte
|
||||
* @param byte
|
||||
* @return void
|
||||
*/
|
||||
public static function addColor(FlatBufferBuilder $builder, $color)
|
||||
{
|
||||
$builder->addSbyteX(0, $color, 2);
|
||||
$builder->addByteX(0, $color, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user