Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
d1e88993
Commit
d1e88993
authored
Dec 14, 2016
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed JS outputting helper for Int64Array.
Change-Id: I7d23fa3416feb78ea18d2c451e7b4e1d9be11bfc
parent
ccba2edb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
idl.h
include/flatbuffers/idl.h
+2
-0
idl_gen_js.cpp
src/idl_gen_js.cpp
+1
-1
No files found.
include/flatbuffers/idl.h
View file @
d1e88993
...
@@ -102,6 +102,8 @@ inline bool IsInteger(BaseType t) { return t >= BASE_TYPE_UTYPE &&
...
@@ -102,6 +102,8 @@ inline bool IsInteger(BaseType t) { return t >= BASE_TYPE_UTYPE &&
t
<=
BASE_TYPE_ULONG
;
}
t
<=
BASE_TYPE_ULONG
;
}
inline
bool
IsFloat
(
BaseType
t
)
{
return
t
==
BASE_TYPE_FLOAT
||
inline
bool
IsFloat
(
BaseType
t
)
{
return
t
==
BASE_TYPE_FLOAT
||
t
==
BASE_TYPE_DOUBLE
;
}
t
==
BASE_TYPE_DOUBLE
;
}
inline
bool
IsLong
(
BaseType
t
)
{
return
t
==
BASE_TYPE_LONG
||
t
==
BASE_TYPE_ULONG
;
}
extern
const
char
*
const
kTypeNames
[];
extern
const
char
*
const
kTypeNames
[];
extern
const
char
kTypeSizes
[];
extern
const
char
kTypeSizes
[];
...
...
src/idl_gen_js.cpp
View file @
d1e88993
...
@@ -576,7 +576,7 @@ void GenStruct(const Parser &parser, StructDef &struct_def, std::string *code_pt
...
@@ -576,7 +576,7 @@ void GenStruct(const Parser &parser, StructDef &struct_def, std::string *code_pt
// For scalar types, emit a typed array helper
// For scalar types, emit a typed array helper
auto
vectorType
=
field
.
value
.
type
.
VectorType
();
auto
vectorType
=
field
.
value
.
type
.
VectorType
();
if
(
IsScalar
(
vectorType
.
base_type
))
{
if
(
IsScalar
(
vectorType
.
base_type
)
&&
!
IsLong
(
vectorType
.
base_type
)
)
{
GenDocComment
(
code_ptr
,
"@returns {"
+
GenType
(
vectorType
)
+
"Array}"
);
GenDocComment
(
code_ptr
,
"@returns {"
+
GenType
(
vectorType
)
+
"Array}"
);
code
+=
object_name
+
".prototype."
+
MakeCamel
(
field
.
name
,
false
);
code
+=
object_name
+
".prototype."
+
MakeCamel
(
field
.
name
,
false
);
code
+=
"Array = function() {
\n
"
+
offset_prefix
;
code
+=
"Array = function() {
\n
"
+
offset_prefix
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment