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

Side by Side Diff: samples/third_party/dromaeo/common/BenchUtil.dart

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/swarm/Views.dart ('k') | samples/third_party/dromaeo/common/Interval.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Misc benchmark-related utility functions. 5 // Misc benchmark-related utility functions.
6 6
7 class BenchUtil { 7 class BenchUtil {
8 static int get now() { 8 static int get now {
9 return new Date.now().millisecondsSinceEpoch; 9 return new Date.now().millisecondsSinceEpoch;
10 } 10 }
11 11
12 static Map<String, Object> deserialize(String data) { 12 static Map<String, Object> deserialize(String data) {
13 return JSON.parse(data); 13 return JSON.parse(data);
14 } 14 }
15 15
16 static String serialize(Object obj) { 16 static String serialize(Object obj) {
17 return JSON.stringify(obj); 17 return JSON.stringify(obj);
18 } 18 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 for (Match match in new RegExp(pattern).allMatches(s)) { 73 for (Match match in new RegExp(pattern).allMatches(s)) {
74 sb.add(s.substring(pos, match.start())); 74 sb.add(s.substring(pos, match.start()));
75 sb.add(replacement(match)); 75 sb.add(replacement(match));
76 pos = match.end(); 76 pos = match.end();
77 } 77 }
78 sb.add(s.substring(pos)); 78 sb.add(s.substring(pos));
79 79
80 return sb.toString(); 80 return sb.toString();
81 } 81 }
82 } 82 }
OLDNEW
« no previous file with comments | « samples/swarm/Views.dart ('k') | samples/third_party/dromaeo/common/Interval.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698