mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
d7b6cc6421
Our existing implementation did not check the element type of the other pointer in the constructors and move assignment operators. This meant that some operations that would require explicit casting on raw pointers were done implicitly, such as: - downcasting a base class to a derived class (e.g. `Kernel::Inode` => `Kernel::ProcFSDirectoryInode` in Kernel/ProcFS.cpp), - casting to an unrelated type (e.g. `Promise<bool>` => `Promise<Empty>` in LibIMAP/Client.cpp) This, of course, allows gross violations of the type system, and makes the need to type-check less obvious before downcasting. Luckily, while adding the `static_ptr_cast`s, only two truly incorrect usages were found; in the other instances, our casts just needed to be made explicit. |
||
---|---|---|
.. | ||
AK | ||
Kernel | ||
LibC | ||
LibCompress | ||
LibCore | ||
LibCpp | ||
LibCrypto | ||
LibELF | ||
LibGfx | ||
LibIMAP | ||
LibJS | ||
LibM | ||
LibMarkdown | ||
LibPthread | ||
LibRegex | ||
LibSQL | ||
LibThreading | ||
LibTLS | ||
LibUnicode | ||
LibWasm | ||
LibWeb | ||
UserspaceEmulator | ||
CMakeLists.txt |