Skip to content

Commit 7948353

Browse files
committed
Added some convenience functions to EventRange.
1 parent 3012020 commit 7948353

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎include/react/detail/graph/GraphBase.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,16 @@ class EventRange
253253
{
254254
public:
255255
using const_iterator = typename std::vector<E>::const_iterator;
256+
using size_type = typename std::vector<E>::size_type;
256257

257258
EventRange(const EventRange&) = default;
258259

259260
const_iterator begin() const { return data_.begin(); }
260261
const_iterator end() const { return data_.end(); }
261262

263+
size_type Size() const { return data_.size(); }
264+
bool IsEmpty() const { return data_.empty(); }
265+
262266
explicit EventRange(const std::vector<E>& data) :
263267
data_( data )
264268
{}

0 commit comments

Comments
 (0)