diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-05 11:11:07 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-05 11:19:00 +0200 |
commit | 1d468ed6d32675e6a48a62ce7e3ea2a15b9ca777 (patch) | |
tree | 0802da0fb4127bd1f44656408df10361c59d0743 /Kernel/Arch | |
parent | 058c614110da17336fdf0f4204bc9c030b3821ce (diff) | |
download | serenity-1d468ed6d32675e6a48a62ce7e3ea2a15b9ca777.zip |
AK: Stop allowing implicit downcast with RefPtr and NonnullRefPtr
We were allowing this dangerous kind of thing:
RefPtr<Base> base;
RefPtr<Derived> derived = base;
This patch changes the {Nonnull,}RefPtr constructors so this is no
longer possible.
To downcast one of these pointers, there is now static_ptr_cast<T>:
RefPtr<Derived> derived = static_ptr_cast<Derived>(base);
Fixing this exposed a ton of cowboy-downcasts in various places,
which we're now forced to fix. :^)
Diffstat (limited to 'Kernel/Arch')
0 files changed, 0 insertions, 0 deletions