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:
Ali Mohammad Pur 2022-05-20 21:08:38 +04:30 committed by Andreas Kling
parent 420f78ca8b
commit 06c6c046f3
Notes: sideshowbarker 2024-07-18 22:57:59 +09:00

View File

@ -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);
}
};