If the read_from_promise_idx is out of bounds, this is an error. We
should not return NULL (and in fact, our caller never expects us to
return NULL).
*/
Promise * Node::get_read_from_promise() const
{
- if (read_from_promise_idx < 0 || read_from_promise_idx >= ((int)read_from_promises.size()))
- return NULL;
+ ASSERT(read_from_promise_idx >= 0 && read_from_promise_idx < ((int)read_from_promises.size()));
return read_from_promises[read_from_promise_idx]->get_reads_from_promise();
}