summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorWouter van Oortmerssen <wvo@google.com>2016-08-08 12:16:10 -0700
committerWouter van Oortmerssen <wvo@google.com>2016-08-08 12:16:10 -0700
commit3eebba789f6447b342a308b0ad38ed0a6fb51de4 (patch)
tree47f277b05c486c2264575dda1476e1ddab7dc5d6 /samples
parentd70f5ac6b02f250dca8e2c6e8f59a4223d1f66f6 (diff)
downloadflatbuffers-3eebba789f6447b342a308b0ad38ed0a6fb51de4.tar.gz
flatbuffers-3eebba789f6447b342a308b0ad38ed0a6fb51de4.tar.bz2
flatbuffers-3eebba789f6447b342a308b0ad38ed0a6fb51de4.zip
Fixed incorrect generated code on convenient vector constructors.
Change-Id: Ib283eade157a436e0f3ca0e68d74e7dc6c51c65b
Diffstat (limited to 'samples')
-rw-r--r--samples/monster_generated.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/monster_generated.h b/samples/monster_generated.h
index 783d1c7f..60a8d3f6 100644
--- a/samples/monster_generated.h
+++ b/samples/monster_generated.h
@@ -198,7 +198,7 @@ inline flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder
const std::vector<flatbuffers::Offset<Weapon>> *weapons = nullptr,
Equipment equipped_type = Equipment_NONE,
flatbuffers::Offset<void> equipped = 0) {
- return CreateMonster(_fbb, pos, mana, hp, name ? 0 : _fbb.CreateString(name), inventory ? 0 : _fbb.CreateVector<uint8_t>(*inventory), color, weapons ? 0 : _fbb.CreateVector<flatbuffers::Offset<Weapon>>(*weapons), equipped_type, equipped);
+ return CreateMonster(_fbb, pos, mana, hp, name ? _fbb.CreateString(name) : 0, inventory ? _fbb.CreateVector<uint8_t>(*inventory) : 0, color, weapons ? _fbb.CreateVector<flatbuffers::Offset<Weapon>>(*weapons) : 0, equipped_type, equipped);
}
inline flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o);
@@ -252,7 +252,7 @@ inline flatbuffers::Offset<Weapon> CreateWeapon(flatbuffers::FlatBufferBuilder &
inline flatbuffers::Offset<Weapon> CreateWeapon(flatbuffers::FlatBufferBuilder &_fbb,
const char *name = nullptr,
int16_t damage = 0) {
- return CreateWeapon(_fbb, name ? 0 : _fbb.CreateString(name), damage);
+ return CreateWeapon(_fbb, name ? _fbb.CreateString(name) : 0, damage);
}
inline flatbuffers::Offset<Weapon> CreateWeapon(flatbuffers::FlatBufferBuilder &_fbb, const WeaponT *_o);