diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-05-20 21:08:38 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-05-21 02:18:40 +0200 |
commit | 06c6c046f3f7f8972b2715a77bbf29fe7d14f9f3 (patch) | |
tree | 5fd74a5c037fdce89207f693e7123ddf0a09b74c /AK/Variant.h | |
parent | 420f78ca8be9b497eeb8e63303969f7bb85cf245 (diff) | |
download | serenity-06c6c046f3f7f8972b2715a77bbf29fe7d14f9f3.zip |
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>
Diffstat (limited to 'AK/Variant.h')
-rw-r--r-- | AK/Variant.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/Variant.h b/AK/Variant.h index c0919ab01e..30856ca9a9 100644 --- a/AK/Variant.h +++ b/AK/Variant.h @@ -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); } }; |