File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
branches/snap-stage3/src/rt/util Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 6bab226fc59f5bd011e243b5a4ec18adcbefdd58
4
+ refs/heads/snap-stage3: eca23da98b7b0a9998ef2307a2ae63f30b1f955d
5
5
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ template<typename T> class array_list {
35
35
size_t size () const ;
36
36
int32_t append (T value);
37
37
int32_t push (T value);
38
- bool pop (T *value);
38
+ void pop (T *value);
39
39
bool replace (T old_value, T new_value);
40
40
int32_t index_of (T value) const ;
41
41
bool is_empty () const ;
@@ -81,17 +81,14 @@ array_list<T>::push(T value) {
81
81
return _size - 1 ;
82
82
}
83
83
84
- template <typename T> bool
84
+ template <typename T> void
85
85
array_list<T>::pop(T *value) {
86
- if (_size == 0 ) {
87
- return false ;
88
- }
86
+ assert (_size > 0 );
89
87
if (value != NULL ) {
90
88
*value = _data[-- _size];
91
89
} else {
92
90
-- _size;
93
91
}
94
- return true ;
95
92
}
96
93
97
94
/* *
You can’t perform that action at this time.
0 commit comments