[Dart] Fix prepare space for writeListInt64 and writeListUint64 (#5654)
* Fix prepare space for writeListInt64 and writeListUint64 * Fix align issues
This commit is contained in:
parent
aa75e5734b
commit
ce3a1c43a2
|
@ -492,7 +492,7 @@ class Builder {
|
||||||
/// Write the given list of 64-bit float [values].
|
/// Write the given list of 64-bit float [values].
|
||||||
int writeListFloat64(List<double> values) {
|
int writeListFloat64(List<double> values) {
|
||||||
_ensureNoVTable();
|
_ensureNoVTable();
|
||||||
_prepare(4, 1 + (2 * values.length));
|
_prepare(_sizeofFloat64, values.length, additionalBytes: _sizeofUint32);
|
||||||
final int result = _tail;
|
final int result = _tail;
|
||||||
int tail = _tail;
|
int tail = _tail;
|
||||||
_setUint32AtTail(_buf, tail, values.length);
|
_setUint32AtTail(_buf, tail, values.length);
|
||||||
|
@ -522,7 +522,7 @@ class Builder {
|
||||||
/// Write the given list of signed 64-bit integer [values].
|
/// Write the given list of signed 64-bit integer [values].
|
||||||
int writeListInt64(List<int> values) {
|
int writeListInt64(List<int> values) {
|
||||||
_ensureNoVTable();
|
_ensureNoVTable();
|
||||||
_prepare(_sizeofUint32, 2 * values.length);
|
_prepare(_sizeofInt64, values.length, additionalBytes: _sizeofUint32);
|
||||||
final int result = _tail;
|
final int result = _tail;
|
||||||
int tail = _tail;
|
int tail = _tail;
|
||||||
_setUint32AtTail(_buf, tail, values.length);
|
_setUint32AtTail(_buf, tail, values.length);
|
||||||
|
@ -537,7 +537,7 @@ class Builder {
|
||||||
/// Write the given list of signed 64-bit integer [values].
|
/// Write the given list of signed 64-bit integer [values].
|
||||||
int writeListUint64(List<int> values) {
|
int writeListUint64(List<int> values) {
|
||||||
_ensureNoVTable();
|
_ensureNoVTable();
|
||||||
_prepare(_sizeofUint32, 2 * values.length);
|
_prepare(_sizeofUint64, values.length, additionalBytes: _sizeofUint32);
|
||||||
final int result = _tail;
|
final int result = _tail;
|
||||||
int tail = _tail;
|
int tail = _tail;
|
||||||
_setUint32AtTail(_buf, tail, values.length);
|
_setUint32AtTail(_buf, tail, values.length);
|
||||||
|
|
Loading…
Reference in New Issue