Skip to content

Commit 60996f7

Browse files
jesse99brson
authored andcommitted
---
yaml --- r: 35559 b: refs/heads/master c: eca23da h: refs/heads/master i: 35557: 684fb7f 35555: 89a77f5 35551: cdd8804 v: v3
1 parent 6795608 commit 60996f7

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,5 +1,5 @@
11
---
2-
refs/heads/master: 6bab226fc59f5bd011e243b5a4ec18adcbefdd58
2+
refs/heads/master: eca23da98b7b0a9998ef2307a2ae63f30b1f955d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024

trunk/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)