mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-16 17:00:35 +03:00
AK: Use static_cast to cast to base type
This is an issue on systems that don't have the empty base class optimisation (such as windows), and we normally don't need to care - however static_cast is technically the right thing to use, so let's use that instead. Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
This commit is contained in:
parent
420f78ca8b
commit
06c6c046f3
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/06c6c046f3 Pull-request: https://github.com/SerenityOS/serenity/pull/14070
@ -148,7 +148,7 @@ private:
|
||||
{
|
||||
// Warning: Internal type shenanigans - VariantsConstrutors<T, Base> <- Base
|
||||
// Not the other way around, so be _really_ careful not to cause issues.
|
||||
return *reinterpret_cast<Base*>(this);
|
||||
return *static_cast<Base*>(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user