| 299 | } |
| 300 | |
| 301 | void UniformGrid::FillSpots(bool value, int row, int column, int width, int height) |
| 302 | { |
| 303 | RECT rect1 = { 0, 0, m_SpotsWidth, m_SpotsHeight }, rect2 = { column, row, column + width, row + height }; |
| 304 | |
| 305 | // Precompute bounds to skip branching in main loop |
| 306 | RECT bounds { }; |
| 307 | IntersectRect(&bounds, &rect1, &rect2); |
| 308 | |
| 309 | for (int i = bounds.top; i < bounds.bottom; i++) |
| 310 | { |
| 311 | for (int j = bounds.left; j < bounds.right; j++) |
| 312 | { |
| 313 | m_TakenSpots[(i * m_SpotsWidth) + j] = value; |
| 314 | } |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | std::experimental::generator<std::tuple<int, int>> UniformGrid::GetFreeSpots(int firstColumn, bool topDown) |
| 319 | { |
nothing calls this directly
no outgoing calls
no test coverage detected