parent
88adae73ba
commit
e380b6ed66
2 changed files with 8 additions and 8 deletions
|
|
@ -308,9 +308,7 @@ void CWLSurfaceResource::breadthfirst(std::function<void(SP<CWLSurfaceResource>,
|
|||
|
||||
std::pair<SP<CWLSurfaceResource>, Vector2D> CWLSurfaceResource::at(const Vector2D& localCoords, bool allowsInput) {
|
||||
std::vector<std::pair<SP<CWLSurfaceResource>, Vector2D>> surfs;
|
||||
breadthfirst([](SP<CWLSurfaceResource> surf, const Vector2D& offset,
|
||||
void* data) { ((std::vector<std::pair<SP<CWLSurfaceResource>, Vector2D>>*)data)->emplace_back(std::make_pair<>(surf, offset)); },
|
||||
&surfs);
|
||||
breadthfirst([&surfs](SP<CWLSurfaceResource> surf, const Vector2D& offset, void* data) { surfs.emplace_back(std::make_pair<>(surf, offset)); }, &surfs);
|
||||
|
||||
for (auto const& [surf, pos] : surfs | std::views::reverse) {
|
||||
if (!allowsInput) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue