mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03: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. |
||
---|---|---|
.. | ||
AST.h | ||
CreateSchema.cpp | ||
CreateTable.cpp | ||
Expression.cpp | ||
Insert.cpp | ||
Lexer.cpp | ||
Lexer.h | ||
Parser.cpp | ||
Parser.h | ||
Select.cpp | ||
SyntaxHighlighter.cpp | ||
SyntaxHighlighter.h | ||
Token.cpp | ||
Token.h |