diff options
author | Derek Bailey <derekbailey@google.com> | 2022-02-01 21:48:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 21:48:36 -0800 |
commit | 68a7661546e973e2e0effbeaf5446da6a0a9fb34 (patch) | |
tree | 84cad2b4c71eb75f6e52c1bd3d15fee1ccf8b3fa /dart | |
parent | 7dac9961f02b454b6c85b7d69cb09f47842e0331 (diff) | |
download | flatbuffers-68a7661546e973e2e0effbeaf5446da6a0a9fb34.tar.gz flatbuffers-68a7661546e973e2e0effbeaf5446da6a0a9fb34.tar.bz2 flatbuffers-68a7661546e973e2e0effbeaf5446da6a0a9fb34.zip |
more omit type annotations for dart local variables (#7069)
Diffstat (limited to 'dart')
-rw-r--r-- | dart/lib/flat_buffers.dart | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dart/lib/flat_buffers.dart b/dart/lib/flat_buffers.dart index 8130bf76..cd1639cb 100644 --- a/dart/lib/flat_buffers.dart +++ b/dart/lib/flat_buffers.dart @@ -1032,8 +1032,8 @@ abstract class Reader<T> { @pragma('vm:prefer-inline') int _vTableFieldOffset(BufferContext object, int offset, int field) { var vTableSOffset = object._getInt32(offset); - int vTableOffset = offset - vTableSOffset; - int vTableSize = object._getUint16(vTableOffset); + var vTableOffset = offset - vTableSOffset; + var vTableSize = object._getUint16(vTableOffset); if (field >= vTableSize) return 0; return object._getUint16(vTableOffset + field); } @@ -1052,8 +1052,8 @@ class StringReader extends Reader<String> { @override @pragma('vm:prefer-inline') String read(BufferContext bc, int offset) { - int strOffset = bc.derefObject(offset); - int length = bc._getUint32(strOffset); + var strOffset = bc.derefObject(offset); + var length = bc._getUint32(strOffset); Uint8List bytes = bc._asUint8List(strOffset + _sizeofUint32, length); if (asciiOptimization && _isLatin(bytes)) { return String.fromCharCodes(bytes); @@ -1063,8 +1063,8 @@ class StringReader extends Reader<String> { @pragma('vm:prefer-inline') static bool _isLatin(Uint8List bytes) { - int length = bytes.length; - for (int i = 0; i < length; i++) { + var length = bytes.length; + for (var i = 0; i < length; i++) { if (bytes[i] > 127) { return false; } @@ -1099,7 +1099,7 @@ abstract class TableReader<T> extends Reader<T> { @override T read(BufferContext bc, int offset) { - int objectOffset = bc.derefObject(offset); + var objectOffset = bc.derefObject(offset); return createObject(bc, objectOffset); } } |