|
12 | 12 | #include "../render/OpenGL.hpp" |
13 | 13 | #include <ranges> |
14 | 14 |
|
15 | | -SP<CPopup> CPopup::create(PHLWINDOW pOwner) { |
16 | | - auto popup = SP<CPopup>(new CPopup()); |
| 15 | +UP<CPopup> CPopup::create(PHLWINDOW pOwner) { |
| 16 | + auto popup = UP<CPopup>(new CPopup()); |
17 | 17 | popup->m_pWindowOwner = pOwner; |
18 | 18 | popup->m_pSelf = popup; |
19 | 19 | popup->initAllSignals(); |
20 | 20 | return popup; |
21 | 21 | } |
22 | 22 |
|
23 | | -SP<CPopup> CPopup::create(PHLLS pOwner) { |
24 | | - auto popup = SP<CPopup>(new CPopup()); |
| 23 | +UP<CPopup> CPopup::create(PHLLS pOwner) { |
| 24 | + auto popup = UP<CPopup>(new CPopup()); |
25 | 25 | popup->m_pLayerOwner = pOwner; |
26 | 26 | popup->m_pSelf = popup; |
27 | 27 | popup->initAllSignals(); |
28 | 28 | return popup; |
29 | 29 | } |
30 | 30 |
|
31 | | -SP<CPopup> CPopup::create(SP<CXDGPopupResource> resource, WP<CPopup> pOwner) { |
32 | | - auto popup = SP<CPopup>(new CPopup()); |
| 31 | +UP<CPopup> CPopup::create(SP<CXDGPopupResource> resource, WP<CPopup> pOwner) { |
| 32 | + auto popup = UP<CPopup>(new CPopup()); |
33 | 33 | popup->m_pResource = resource; |
34 | 34 | popup->m_pWindowOwner = pOwner->m_pWindowOwner; |
35 | 35 | popup->m_pLayerOwner = pOwner->m_pLayerOwner; |
@@ -282,7 +282,8 @@ void CPopup::recheckTree() { |
282 | 282 | } |
283 | 283 |
|
284 | 284 | void CPopup::recheckChildrenRecursive() { |
285 | | - auto cpy = m_vChildren; |
| 285 | + std::vector<WP<CPopup>> cpy; |
| 286 | + std::ranges::for_each(m_vChildren, [&cpy](const auto& el) { cpy.emplace_back(el); }); |
286 | 287 | for (auto const& c : cpy) { |
287 | 288 | c->onCommit(true); |
288 | 289 | c->recheckChildrenRecursive(); |
|
0 commit comments