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

Unified Diff: samples/dartcombat/grids.dart

Issue 11312122: Change List constructors. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload. Adapt code for List.fixedLength. Created 8 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 | « samples/chat/chat_server_lib.dart ('k') | samples/sample_extension/sample_asynchronous_extension.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/dartcombat/grids.dart
diff --git a/samples/dartcombat/grids.dart b/samples/dartcombat/grids.dart
index bf482a3afc19d787b65df84fa1ba60d8293849f3..88b556d9cda41ad2bfefcdb5be9534d247bcd4f2 100644
--- a/samples/dartcombat/grids.dart
+++ b/samples/dartcombat/grids.dart
@@ -19,9 +19,9 @@ class Boat {
class BoatGrid {
List<List<Boat>> boatMap;
- BoatGrid() : boatMap = new List(Constants.SIZE) {
+ BoatGrid() : boatMap = new List.fixedLength(Constants.SIZE) {
for (int i = 0; i < Constants.SIZE; i++) {
- boatMap[i] = new List(10);
+ boatMap[i] = new List.fixedLength(10);
}
}
@@ -59,9 +59,9 @@ class GridState {
List<List<int>> cells;
GridState()
- : cells = new List(Constants.SIZE) {
+ : cells = new List.fixedLength(Constants.SIZE) {
for (int i = 0; i < Constants.SIZE; i++) {
- cells[i] = new List(10);
+ cells[i] = new List.fixedLength(10);
}
}
« no previous file with comments | « samples/chat/chat_server_lib.dart ('k') | samples/sample_extension/sample_asynchronous_extension.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698