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

Side by Side Diff: runtime/lib/string_buffer.dart

Issue 10653002: Fix some warnings in the core library identified by the static analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years, 6 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 | « runtime/lib/mirrors_impl.dart ('k') | runtime/tests/vm/dart/byte_array_test.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 /** 5 /**
6 * The StringBuffer class is useful for concatenating strings 6 * The StringBuffer class is useful for concatenating strings
7 * efficiently. Only on a call to [toString] are the strings 7 * efficiently. Only on a call to [toString] are the strings
8 * concatenated to a single String. 8 * concatenated to a single String.
9 */ 9 */
10 class StringBufferImpl implements StringBuffer { 10 class StringBufferImpl implements StringBuffer {
(...skipping 25 matching lines...) Expand all
36 return this; 36 return this;
37 } 37 }
38 _buffer.add(str); 38 _buffer.add(str);
39 _length += str.length; 39 _length += str.length;
40 return this; 40 return this;
41 } 41 }
42 42
43 /** 43 /**
44 * Adds all items in [objects] to the buffer. Returns [this]. 44 * Adds all items in [objects] to the buffer. Returns [this].
45 */ 45 */
46 StringBuffer addAll(Collection<Object> objects) { 46 StringBuffer addAll(Collection objects) {
47 for (Object obj in objects) { 47 for (Object obj in objects) {
48 add(obj); 48 add(obj);
49 } 49 }
50 return this; 50 return this;
51 } 51 }
52 52
53 /** 53 /**
54 * Adds the string representation of [charCode] to the buffer. 54 * Adds the string representation of [charCode] to the buffer.
55 * Returns [this]. 55 * Returns [this].
56 */ 56 */
(...skipping 20 matching lines...) Expand all
77 _buffer.clear(); 77 _buffer.clear();
78 _buffer.add(result); 78 _buffer.add(result);
79 // Since we track the length at each add operation, there is no 79 // Since we track the length at each add operation, there is no
80 // need to update it in this function. 80 // need to update it in this function.
81 return result; 81 return result;
82 } 82 }
83 83
84 List<String> _buffer; 84 List<String> _buffer;
85 int _length; 85 int _length;
86 } 86 }
OLDNEW
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | runtime/tests/vm/dart/byte_array_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698