summaryrefslogtreecommitdiffstats
path: root/src/Item.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Item.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Item.h b/src/Item.h
index 2f7b1a238..d3f853170 100644
--- a/src/Item.h
+++ b/src/Item.h
@@ -230,6 +230,8 @@ public:
cItem * Get (int a_Idx);
void Set (int a_Idx, const cItem & a_Item);
void Add (const cItem & a_Item) {push_back(a_Item); }
+ void Add (short a_ItemType) { emplace_back(a_ItemType); }
+ void Add (short a_ItemType, char a_ItemCount) { emplace_back(a_ItemType, a_ItemCount); }
void Delete(int a_Idx);
void Clear (void) {clear(); }
size_t Size (void) const { return size(); }
@@ -239,7 +241,7 @@ public:
void Add (short a_ItemType, char a_ItemCount, short a_ItemDamage)
{
- push_back(cItem(a_ItemType, a_ItemCount, a_ItemDamage));
+ emplace_back(a_ItemType, a_ItemCount, a_ItemDamage);
}
/** Adds a copy of all items in a_ItemGrid. */