mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-06 21:37:36 +00:00
Fixed float suffix not being added on implicit float defaults.
Change-Id: I8dcbb5e93836356511d411ef86452babd3dd3c0b Tested: on Linux.
This commit is contained in:
@@ -351,22 +351,31 @@ class Monster extends Table
|
||||
return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : 3.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float
|
||||
*/
|
||||
public function getTestf3()
|
||||
{
|
||||
$o = $this->__offset(58);
|
||||
return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : 0.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FlatBufferBuilder $builder
|
||||
* @return void
|
||||
*/
|
||||
public static function startMonster(FlatBufferBuilder $builder)
|
||||
{
|
||||
$builder->StartObject(27);
|
||||
$builder->StartObject(28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FlatBufferBuilder $builder
|
||||
* @return Monster
|
||||
*/
|
||||
public static function createMonster(FlatBufferBuilder $builder, $pos, $mana, $hp, $name, $inventory, $color, $test_type, $test, $test4, $testarrayofstring, $testarrayoftables, $enemy, $testnestedflatbuffer, $testempty, $testbool, $testhashs32_fnv1, $testhashu32_fnv1, $testhashs64_fnv1, $testhashu64_fnv1, $testhashs32_fnv1a, $testhashu32_fnv1a, $testhashs64_fnv1a, $testhashu64_fnv1a, $testarrayofbools, $testf, $testf2)
|
||||
public static function createMonster(FlatBufferBuilder $builder, $pos, $mana, $hp, $name, $inventory, $color, $test_type, $test, $test4, $testarrayofstring, $testarrayoftables, $enemy, $testnestedflatbuffer, $testempty, $testbool, $testhashs32_fnv1, $testhashu32_fnv1, $testhashs64_fnv1, $testhashu64_fnv1, $testhashs32_fnv1a, $testhashu32_fnv1a, $testhashs64_fnv1a, $testhashu64_fnv1a, $testarrayofbools, $testf, $testf2, $testf3)
|
||||
{
|
||||
$builder->startObject(27);
|
||||
$builder->startObject(28);
|
||||
self::addPos($builder, $pos);
|
||||
self::addMana($builder, $mana);
|
||||
self::addHp($builder, $hp);
|
||||
@@ -393,6 +402,7 @@ class Monster extends Table
|
||||
self::addTestarrayofbools($builder, $testarrayofbools);
|
||||
self::addTestf($builder, $testf);
|
||||
self::addTestf2($builder, $testf2);
|
||||
self::addTestf3($builder, $testf3);
|
||||
$o = $builder->endObject();
|
||||
$builder->required($o, 10); // name
|
||||
return $o;
|
||||
@@ -797,6 +807,16 @@ class Monster extends Table
|
||||
$builder->addFloatX(26, $testf2, 3.0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FlatBufferBuilder $builder
|
||||
* @param float
|
||||
* @return void
|
||||
*/
|
||||
public static function addTestf3(FlatBufferBuilder $builder, $testf3)
|
||||
{
|
||||
$builder->addFloatX(27, $testf3, 0.0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FlatBufferBuilder $builder
|
||||
* @return int table offset
|
||||
|
||||
Reference in New Issue
Block a user