Skip to content

Commit

Permalink
xrGame/Inventory.h|cpp: moved CInventorySlot functions to the header
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Dec 14, 2022
1 parent 588feb3 commit d0c0f2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
9 changes: 0 additions & 9 deletions src/xrGame/Inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ bool defaultSlotActiveness[] =
false // helmet
};

CInventorySlot::CInventorySlot()
{
m_pIItem = NULL;
m_bAct = true;
m_bPersistent = false;
}

CInventorySlot::~CInventorySlot() {}
bool CInventorySlot::CanBeActivated() const { return (m_bAct); };
CInventory::CInventory()
{
m_fMaxWeight = pSettings->r_float("inventory", "max_weight");
Expand Down
13 changes: 5 additions & 8 deletions src/xrGame/Inventory.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ class CInventoryItem;
class CHudItem;
class CInventoryOwner;

class CInventorySlot
class CInventorySlot final
{
public:
CInventorySlot();
virtual ~CInventorySlot();
bool CanBeActivated() const { return m_bAct; }

bool CanBeActivated() const;

PIItem m_pIItem;
bool m_bPersistent;
bool m_bAct;
PIItem m_pIItem = nullptr;
bool m_bPersistent = false;
bool m_bAct = true;
};

class priority_group
Expand Down

0 comments on commit d0c0f2d

Please sign in to comment.