Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(640)

Unified Diff: mojo/dart/packages/mojo/lib/src/codec.dart

Issue 1513923003: Dart floating-point array encoders should accept a List<double> (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/packages/mojo/lib/src/codec.dart
diff --git a/mojo/dart/packages/mojo/lib/src/codec.dart b/mojo/dart/packages/mojo/lib/src/codec.dart
index 54618605143e0e40781741d9bf007034ffbc6e5f..9d62b541f375d11f7be377d521939484f8c06ab0 100644
--- a/mojo/dart/packages/mojo/lib/src/codec.dart
+++ b/mojo/dart/packages/mojo/lib/src/codec.dart
@@ -351,7 +351,7 @@ class Encoder {
encoder.appendUint8Array(bytes);
}
- void encodeArray(Function arrayAppend, int elementBytes, List<int> value,
+ void encodeArray(Function arrayAppend, int elementBytes, List value,
int offset, int nullability, int expectedLength) {
if (value == null) {
encodeNullPointer(offset, isArrayNullable(nullability));
@@ -403,12 +403,14 @@ class Encoder {
nullability, expectedLength);
void encodeFloatArray(
- List<int> value, int offset, int nullability, int expectedLength) =>
+ List<double> value, int offset, int nullability,
+ int expectedLength) =>
encodeArray((e, v) => e.appendFloatArray(v), 4, value, offset,
nullability, expectedLength);
void encodeDoubleArray(
- List<int> value, int offset, int nullability, int expectedLength) =>
+ List<double> value, int offset, int nullability,
+ int expectedLength) =>
encodeArray((e, v) => e.appendDoubleArray(v), 8, value, offset,
nullability, expectedLength);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698