mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Enums in C++ are now strongly typed.
Accessors and constructors now take enum types rather than ints. Bug: 16570507 Change-Id: I4b50fd64ad2e662ea2481bc0ccea784326fb31c0 Tested: on Linux and Windows.
This commit is contained in:
@@ -72,7 +72,7 @@ class JavaTest {
|
||||
|
||||
Monster.startMonster(fbb);
|
||||
Monster.addPos(fbb, Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0,
|
||||
(byte)4, (short)5, (byte)6));
|
||||
Color.Green, (short)5, (byte)6));
|
||||
Monster.addHp(fbb, (short)80);
|
||||
Monster.addName(fbb, str);
|
||||
Monster.addInventory(fbb, inv);
|
||||
@@ -135,7 +135,7 @@ class JavaTest {
|
||||
TestEq(pos.y(), 2.0f);
|
||||
TestEq(pos.z(), 3.0f);
|
||||
TestEq(pos.test1(), 3.0);
|
||||
TestEq(pos.test2(), (byte)4);
|
||||
TestEq(pos.test2(), Color.Green);
|
||||
Test t = pos.test3();
|
||||
TestEq(t.a(), (short)5);
|
||||
TestEq(t.b(), (byte)6);
|
||||
|
||||
Reference in New Issue
Block a user