ladybird/Userland/Libraries/LibPDF
Daniel Bertalan d7b6cc6421 Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr
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.
2021-09-03 23:20:23 +02:00
..
CMakeLists.txt LibPDF: Split ColorSpace into a different class for each color space 2021-06-12 22:45:01 +04:30
ColorSpace.cpp LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
ColorSpace.h LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
Command.h LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
CommonNames.cpp LibPDF: Pre-initialize common FlyStrings in CommonNames.h 2021-05-25 00:24:09 +04:30
CommonNames.h LibPDF: Handle the gs graphical operator 2021-06-12 22:45:01 +04:30
Document.cpp Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
Document.h LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
Filter.cpp LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
Filter.h LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
Forward.h LibPDF: Store indirect value refs in Value objects 2021-05-25 00:24:09 +04:30
Object.cpp LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
Object.h Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
Parser.cpp Everywhere: Use AK/Math.h if applicable 2021-07-19 16:34:21 +04:30
Parser.h LibPDF: Fix treating not finding the linearized dict as a fatal error 2021-07-16 20:44:10 +02:00
Reader.h LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
Renderer.cpp LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
Renderer.h LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
Value.cpp LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
Value.h LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30
XRefTable.h LibPDF: Convert to east-const to comply with the recent style changes 2021-06-12 22:45:01 +04:30