| 17 | } |
| 18 | |
| 19 | inline void PatchControlArray_invert(PatchControlArray& ctrl, std::size_t width, std::size_t height) |
| 20 | { |
| 21 | PatchControlArray tmp(width); |
| 22 | |
| 23 | PatchControlIter from = ctrl.begin() + (width * (height - 1)); |
| 24 | PatchControlIter to = ctrl.begin(); |
| 25 | |
| 26 | for(std::size_t h = 0; h != ((height - 1) >> 1); ++h, to += width, from -= width) |
| 27 | { |
| 28 | copy_ctrl(tmp.begin(), to, to + width); |
| 29 | copy_ctrl(to, from, from + width); |
| 30 | copy_ctrl(from, tmp.begin(), tmp.begin() + width); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | #endif /*PATCHCONTROL_H_*/ |
no test coverage detected