collects writing operations under `op` into `write_ops`, and resets the reading ops (including `op` itself)
| 153 | // collects writing operations under `op` into `write_ops`, and resets the |
| 154 | // reading ops (including `op` itself) |
| 155 | static void _OpBase_PropagateReset |
| 156 | ( |
| 157 | OpBase *op, |
| 158 | OpBase ***write_ops |
| 159 | ) { |
| 160 | if(op->reset) { |
| 161 | if(OpBase_IsWriter(op)) { |
| 162 | array_append(*write_ops, op); |
| 163 | } else { |
| 164 | OpResult res = op->reset(op); |
| 165 | ASSERT(res == OP_OK); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | // recursively reset children |
| 170 | for(int i = 0; i < op->childCount; i++) { |
| 171 | _OpBase_PropagateReset(op->children[i], write_ops); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | void OpBase_PropagateReset |
| 176 | ( |
no test coverage detected