Add DestroyAllWindows helper that uses vector copy
This commit is contained in:
parent
bfb9388191
commit
8311aa667c
3 changed files with 11 additions and 2 deletions
|
@ -76,6 +76,13 @@ void WindowList::CloseAllWindows() {
|
|||
window->Close();
|
||||
}
|
||||
|
||||
// static
|
||||
void WindowList::DestroyAllWindows() {
|
||||
WindowVector windows = GetInstance()->windows_;
|
||||
for (const auto& window : windows)
|
||||
window->CloseContents(nullptr); // e.g. Destroy()
|
||||
}
|
||||
|
||||
WindowList::WindowList() {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue