| 381 | // void (const ShapeIndex& index, const Piece& piece) |
| 382 | template <typename Fn> |
| 383 | void ForEachSubpiece(const Fn& func) const { |
| 384 | ShapeIndex index; |
| 385 | return ForEachHelper( |
| 386 | [&func](const ShapeIndex& index, const Piece& piece) { |
| 387 | func(index, piece); |
| 388 | return Status::OK(); |
| 389 | }, |
| 390 | *this, &index) |
| 391 | .IgnoreError(); |
| 392 | } |
| 393 | // Same as above, but the function has the type: |
| 394 | // Status (const ShapeIndex& index, const Piece& piece) |
| 395 | // The first non-OK return value is returned by the function. |
no test coverage detected