mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-16 09:12:22 +00:00
use Bool for flatbuffers bool instead of Byte (#7876)
Add test for Bool type in swift Co-authored-by: mustiikhalil <26250654+mustiikhalil@users.noreply.github.com>
This commit is contained in:
@@ -725,9 +725,9 @@ class SwiftGenerator : public BaseGenerator {
|
||||
code_.SetValue("CONSTANT", default_value);
|
||||
code_.SetValue("VALUETYPE", "Bool");
|
||||
code_ += GenReaderMainBody(optional) + "\\";
|
||||
code_.SetValue("VALUETYPE", "Byte");
|
||||
code_ += GenOffset() + "return o == 0 ? {{CONSTANT}} : 0 != " +
|
||||
GenReader("VALUETYPE", "o") + " }";
|
||||
code_ += GenOffset() +
|
||||
"return o == 0 ? {{CONSTANT}} : " + GenReader("VALUETYPE", "o") +
|
||||
" }";
|
||||
if (parser_.opts.mutable_buffer) code_ += GenMutate("o", GenOffset());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user