mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
add const accessor to Inventory
This commit is contained in:
@@ -378,6 +378,10 @@ unsigned int Inventory::size( ) const {
|
||||
return inv.size( );
|
||||
}
|
||||
|
||||
auto Inventory::get() const -> const std::vector<OBJECTTYPE>& {
|
||||
return inv;
|
||||
}
|
||||
|
||||
// Assignment operator
|
||||
Inventory& Inventory::operator=(const Inventory& src)
|
||||
{
|
||||
|
||||
@@ -772,6 +772,9 @@ public:
|
||||
// How any slots are there in this inventory?
|
||||
unsigned int size() const;
|
||||
|
||||
// const-only accessor
|
||||
auto get() const -> const std::vector<OBJECTTYPE>&;
|
||||
|
||||
//temporarily? public
|
||||
std::vector<int> bNewItemCount;
|
||||
std::vector<int> bNewItemCycleCount;
|
||||
|
||||
Reference in New Issue
Block a user