Skip to content

Commit e413a76

Browse files
jesse99brson
authored andcommitted
---
yaml --- r: 36752 b: refs/heads/try2 c: eca23da h: refs/heads/master v: v3
1 parent ba3bab5 commit e413a76

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 6bab226fc59f5bd011e243b5a4ec18adcbefdd58
8+
refs/heads/try2: eca23da98b7b0a9998ef2307a2ae63f30b1f955d
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/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)