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

Side by Side Diff: sdk/lib/io/buffer_list.dart

Issue 18496011: Clean up dart:io warnings/errors found by analyzer tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « no previous file | sdk/lib/io/http_impl.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * Utility class that can fast concatenate [List<int>]s of bytes. Use 8 * Utility class that can fast concatenate [List<int>]s of bytes. Use
9 * [readBytes] to get the final buffer. 9 * [readBytes] to get the final buffer.
10 */ 10 */
11 class _BufferList { 11 class _BufferList {
12 const int _INIT_SIZE = 1 * 1024; 12 static const int _INIT_SIZE = 1 * 1024;
13 13
14 _BufferList() { 14 _BufferList() {
15 clear(); 15 clear();
16 } 16 }
17 17
18 int pow2roundup(int x) { 18 int pow2roundup(int x) {
19 --x; 19 --x;
20 x |= x >> 1; 20 x |= x >> 1;
21 x |= x >> 2; 21 x |= x >> 2;
22 x |= x >> 4; 22 x |= x >> 4;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 * Clears the content of the buffer list. 91 * Clears the content of the buffer list.
92 */ 92 */
93 void clear() { 93 void clear() {
94 _length = 0; 94 _length = 0;
95 _buffer = null; 95 _buffer = null;
96 } 96 }
97 97
98 int _length; // Total number of bytes in the buffer. 98 int _length; // Total number of bytes in the buffer.
99 Uint8List _buffer; // Internal buffer. 99 Uint8List _buffer; // Internal buffer.
100 } 100 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698