mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-23 08:00:00 +00:00
[Lobster] support unsigned integer reads
(depends on the latest Lobster version)
This commit is contained in:
@@ -60,7 +60,10 @@ class LobsterGenerator : public BaseGenerator {
|
||||
|
||||
std::string GenTypeName(const Type &type) {
|
||||
auto bits = NumToString(SizeOf(type.base_type) * 8);
|
||||
if (IsInteger(type.base_type)) return "int" + bits;
|
||||
if (IsInteger(type.base_type)) {
|
||||
if (IsUnsigned(type.base_type)) return "uint" + bits;
|
||||
else return "int" + bits;
|
||||
}
|
||||
if (IsFloat(type.base_type)) return "float" + bits;
|
||||
if (IsString(type)) return "string";
|
||||
if (type.base_type == BASE_TYPE_STRUCT) return "table";
|
||||
|
||||
Reference in New Issue
Block a user