Skip to content

Commit

Permalink
use constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Oct 2, 2024
1 parent 2d0b7a4 commit a72a16f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Client/game_sa/CPlaceableSA.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <CMatrix_Pad.h>
#include <CVector.h>

#define VTBL_CPlaceable 0x863C40
constexpr std::uint32_t VTBL_CPlaceable = 0x863C40;

class CSimpleTransformSAInterface // 16 bytes
{
Expand All @@ -24,8 +24,8 @@ class CPlaceableSAInterface
public:
virtual void* Destructor(bool free) = 0;

bool IsPlaceableVTBL() const { return *reinterpret_cast<const std::uint32_t*>(this) == VTBL_CPlaceable; };
bool HasVTBL() const { return *reinterpret_cast<const std::uint32_t*>(this) != 0; };
bool IsPlaceableVTBL() const { return *reinterpret_cast<const void* const*>(this) == (void*)VTBL_CPlaceable; };
bool HasVTBL() const { return *reinterpret_cast<const void* const*>(this) != nullptr; };

public:
CSimpleTransformSAInterface m_transform;
Expand Down

0 comments on commit a72a16f

Please sign in to comment.