mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-04 04:33:23 +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
@@ -172,7 +172,7 @@ flatbuffers::DetachedBuffer CreateFlatBufferTest(std::string &buffer) {
|
||||
// We use this special creation function because we have an array of
|
||||
// pre-C++11 (enum class) enums whose size likely is int, yet its declared
|
||||
// type in the schema is byte.
|
||||
auto vecofcolors = builder.CreateVectorScalarCast<int8_t, Color>(colors, 2);
|
||||
auto vecofcolors = builder.CreateVectorScalarCast<uint8_t, Color>(colors, 2);
|
||||
|
||||
// shortcut for creating monster with all fields set:
|
||||
auto mloc = CreateMonster(builder, &vec, 150, 80, name, inventory, Color_Blue,
|
||||
|
||||
Reference in New Issue
Block a user