Skip to content

Commit

Permalink
Remove constexpr specifier from functions generated by VIRTUAL_METHOD…
Browse files Browse the repository at this point in the history
… macro
  • Loading branch information
danielkrupinski committed Sep 25, 2020
1 parent acc4023 commit 59347bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Osiris/SDK/Entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,25 @@ class Entity {
VIRTUAL_METHOD(WeaponInfo*, getWeaponData, 460, (), (this))
VIRTUAL_METHOD(float, getInaccuracy, 482, (), (this))

constexpr auto isPistol() noexcept
auto isPistol() noexcept
{
return getWeaponType() == WeaponType::Pistol;
}

constexpr auto isSniperRifle() noexcept
auto isSniperRifle() noexcept
{
return getWeaponType() == WeaponType::SniperRifle;
}

constexpr auto isFullAuto() noexcept
auto isFullAuto() noexcept
{
const auto weaponData = getWeaponData();
if (weaponData)
return weaponData->fullAuto;
return false;
}

constexpr auto requiresRecoilControl() noexcept
auto requiresRecoilControl() noexcept
{
const auto weaponData = getWeaponData();
if (weaponData)
Expand Down
2 changes: 1 addition & 1 deletion Osiris/SDK/InputSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class InputSystem {
return VirtualMethod::call<int, 45>(this, virtualKey);
}

constexpr auto virtualKeyToString(int virtualKey) noexcept
auto virtualKeyToString(int virtualKey) noexcept
{
return buttonCodeToString(virtualKeyToButtonCode(virtualKey));
}
Expand Down
2 changes: 1 addition & 1 deletion Osiris/SDK/VirtualMethod.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace VirtualMethod
}

#define VIRTUAL_METHOD(returnType, name, idx, args, argsRaw) \
constexpr returnType name args noexcept \
returnType name args noexcept \
{ \
return VirtualMethod::call<returnType, idx>argsRaw; \
}

0 comments on commit 59347bb

Please sign in to comment.