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

Side by Side Diff: src/shared/list.h

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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
« no previous file with comments | « src/shared/globals_test.cc ('k') | src/shared/names.h » ('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) 2014, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #ifndef SRC_SHARED_LIST_H_ 5 #ifndef SRC_SHARED_LIST_H_
6 #define SRC_SHARED_LIST_H_ 6 #define SRC_SHARED_LIST_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include "src/shared/assert.h" 10 #include "src/shared/assert.h"
11 11
12 namespace fletch { 12 namespace dartino {
13 13
14 // Lists are light-weight data structures that hold a sequence of 14 // Lists are light-weight data structures that hold a sequence of
15 // contiguous elements. List never take ownership of the data they 15 // contiguous elements. List never take ownership of the data they
16 // are passed in, so as long as the data is either in a zone or 16 // are passed in, so as long as the data is either in a zone or
17 // static, lists can be safely passed by value. 17 // static, lists can be safely passed by value.
18 template <typename T> 18 template <typename T>
19 class List { 19 class List {
20 public: 20 public:
21 List() : data_(NULL), length_(0) {} 21 List() : data_(NULL), length_(0) {}
22 22
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 free(data_); 62 free(data_);
63 data_ = NULL; 63 data_ = NULL;
64 length_ = 0; 64 length_ = 0;
65 } 65 }
66 66
67 private: 67 private:
68 T* data_; 68 T* data_;
69 int length_; 69 int length_;
70 }; 70 };
71 71
72 } // namespace fletch 72 } // namespace dartino
73 73
74 #endif // SRC_SHARED_LIST_H_ 74 #endif // SRC_SHARED_LIST_H_
OLDNEW
« no previous file with comments | « src/shared/globals_test.cc ('k') | src/shared/names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698