Skip to content

Commit b72a75f

Browse files
cljuaardappel
authored andcommitted
Doc: use correct ref types for flatcc string creation. (google#5305)
Some string definitions were typed as ns(Weapon_ref_t) while they should be flatbuffers_string_ref_t. Note that the former was also compiling & running correctly as both ref types boil down to the same underlying ref type.
1 parent 6cfcd86 commit b72a75f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/Tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,10 @@ our `orc` Monster, lets create some `Weapon`s: a `Sword` and an `Axe`.
735735
</div>
736736
<div class="language-c">
737737
~~~{.c}
738-
ns(Weapon_ref_t) weapon_one_name = flatbuffers_string_create_str(B, "Sword");
738+
flatbuffers_string_ref_t weapon_one_name = flatbuffers_string_create_str(B, "Sword");
739739
uint16_t weapon_one_damage = 3;
740740
741-
ns(Weapon_ref_t) weapon_two_name = flatbuffers_string_create_str(B, "Axe");
741+
flatbuffers_string_ref_t weapon_two_name = flatbuffers_string_create_str(B, "Axe");
742742
uint16_t weapon_two_damage = 5;
743743
744744
ns(Weapon_ref_t) sword = ns(Weapon_create(B, weapon_one_name, weapon_one_damage));

0 commit comments

Comments
 (0)