mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 06:05:17 +00:00
[Dart] Fix prepare space for writeListInt64 and writeListUint64 (#5654)
* Fix prepare space for writeListInt64 and writeListUint64 * Fix align issues
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
aa75e5734b
commit
ce3a1c43a2
@@ -492,7 +492,7 @@ class Builder {
|
||||
/// Write the given list of 64-bit float [values].
|
||||
int writeListFloat64(List<double> values) {
|
||||
_ensureNoVTable();
|
||||
_prepare(4, 1 + (2 * values.length));
|
||||
_prepare(_sizeofFloat64, values.length, additionalBytes: _sizeofUint32);
|
||||
final int result = _tail;
|
||||
int tail = _tail;
|
||||
_setUint32AtTail(_buf, tail, values.length);
|
||||
@@ -522,7 +522,7 @@ class Builder {
|
||||
/// Write the given list of signed 64-bit integer [values].
|
||||
int writeListInt64(List<int> values) {
|
||||
_ensureNoVTable();
|
||||
_prepare(_sizeofUint32, 2 * values.length);
|
||||
_prepare(_sizeofInt64, values.length, additionalBytes: _sizeofUint32);
|
||||
final int result = _tail;
|
||||
int tail = _tail;
|
||||
_setUint32AtTail(_buf, tail, values.length);
|
||||
@@ -537,7 +537,7 @@ class Builder {
|
||||
/// Write the given list of signed 64-bit integer [values].
|
||||
int writeListUint64(List<int> values) {
|
||||
_ensureNoVTable();
|
||||
_prepare(_sizeofUint32, 2 * values.length);
|
||||
_prepare(_sizeofUint64, values.length, additionalBytes: _sizeofUint32);
|
||||
final int result = _tail;
|
||||
int tail = _tail;
|
||||
_setUint32AtTail(_buf, tail, values.length);
|
||||
|
||||
Reference in New Issue
Block a user