mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
AK+WindowServer: Remove did_construct() framework used only once
There is also make_ref_counted(), which does not call did_construct(), so the method was not guaranteed to be run. Since there is only a single user, and `WindowServer::Window` is a final class anyway (so there is no need to separate the constructor and post-constructor phases), let's get rid of this concept. (The following commits reduce the opportunities to call make_ref_counted, but still.)
This commit is contained in:
parent
68c8d23e39
commit
2e6bb987a3
Notes:
sideshowbarker
2024-07-18 01:33:18 +09:00
Author: https://github.com/BenWiederhake
Commit: 2e6bb987a3
Pull-request: https://github.com/SerenityOS/serenity/pull/10745
Reviewed-by: https://github.com/PeterBindels-TomTom
Reviewed-by: https://github.com/sin-ack ✅
3 changed files with 1 additions and 7 deletions
|
@ -70,8 +70,6 @@ public: \
|
|||
static inline NonnullRefPtr<klass> construct(Args&&... args) \
|
||||
{ \
|
||||
auto obj = adopt_ref(*new Klass(forward<Args>(args)...)); \
|
||||
if constexpr (requires { declval<Klass>().did_construct(); }) \
|
||||
obj->did_construct(); \
|
||||
return obj; \
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue