| 479 | } |
| 480 | |
| 481 | inline const Controller* Sender::SubController(int index) const { |
| 482 | if (index != 0) { |
| 483 | return NULL; |
| 484 | } |
| 485 | for (int i = 0; i < _nfree; ++i) { |
| 486 | if (!_free_resources[i].sub_done->_cntl.Failed()) { |
| 487 | return &_free_resources[i].sub_done->_cntl; |
| 488 | } |
| 489 | } |
| 490 | if (_nfree != 0) { |
| 491 | return &_free_resources[_nfree - 1].sub_done->_cntl; |
| 492 | } |
| 493 | return NULL; |
| 494 | } |
| 495 | |
| 496 | } // namespace schan |
| 497 |
no test coverage detected