Skip to content

Commit 3effbe1

Browse files
jesse99brson
authored andcommitted
---
yaml --- r: 34140 b: refs/heads/snap-stage3 c: eca23da h: refs/heads/master v: v3
1 parent 166062b commit 3effbe1

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6bab226fc59f5bd011e243b5a4ec18adcbefdd58
4+
refs/heads/snap-stage3: eca23da98b7b0a9998ef2307a2ae63f30b1f955d
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/rt/util/array_list.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ template<typename T> class array_list {
3535
size_t size() const;
3636
int32_t append(T value);
3737
int32_t push(T value);
38-
bool pop(T *value);
38+
void pop(T *value);
3939
bool replace(T old_value, T new_value);
4040
int32_t index_of(T value) const;
4141
bool is_empty() const;
@@ -81,17 +81,14 @@ array_list<T>::push(T value) {
8181
return _size - 1;
8282
}
8383

84-
template<typename T> bool
84+
template<typename T> void
8585
array_list<T>::pop(T *value) {
86-
if (_size == 0) {
87-
return false;
88-
}
86+
assert(_size > 0);
8987
if (value != NULL) {
9088
*value = _data[-- _size];
9189
} else {
9290
-- _size;
9391
}
94-
return true;
9592
}
9693

9794
/**

0 commit comments

Comments
 (0)