1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 13:58:11 +00:00
serenity/Userland/Libraries/LibIMAP
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
..
Client.cpp Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
Client.h Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
CMakeLists.txt LibIMAP: Add quoted printable decoder 2021-07-24 20:11:28 +04:30
Objects.cpp Everywhere: Make use of container version of all_of 2021-08-03 10:46:43 +02:00
Objects.h LibIMAP: Remove accidental use of STL 2021-09-01 23:02:18 +02:00
Parser.cpp LibIMAP: Parse (but ignore) OK [HIGHESTMODSEQ <mod-sequence-value>] 2021-07-24 22:22:41 +01:00
Parser.h LibIMAP: Add and use Parser::consume_until_end_of_line() 2021-07-24 22:22:41 +01:00
QuotedPrintable.cpp LibIMAP: Add quoted printable decoder 2021-07-24 20:11:28 +04:30
QuotedPrintable.h LibIMAP: Add quoted printable decoder 2021-07-24 20:11:28 +04:30