summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2014-01-11 19:46:37 +0100
committerKahrl <kahrl@gmx.net>2014-01-11 19:46:37 +0100
commit51e6feb17c5929c60b5e8b87cb02c0d22ddb6ff5 (patch)
tree64513f98158e480666810ae4bc072bdc9f3b91fc /src/inventory.cpp
parent84b94eb19804484b689cec441e175628fd10335f (diff)
downloadminetest-51e6feb17c5929c60b5e8b87cb02c0d22ddb6ff5.tar.gz
minetest-51e6feb17c5929c60b5e8b87cb02c0d22ddb6ff5.tar.bz2
minetest-51e6feb17c5929c60b5e8b87cb02c0d22ddb6ff5.zip
Add operator!= to Inventory(List), make operator== a const method
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index f4a87bec1..1f55c5305 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -562,7 +562,7 @@ InventoryList & InventoryList::operator = (const InventoryList &other)
return *this;
}
-bool InventoryList::operator == (const InventoryList &other)
+bool InventoryList::operator == (const InventoryList &other) const
{
if(m_size != other.m_size)
return false;
@@ -875,7 +875,7 @@ Inventory & Inventory::operator = (const Inventory &other)
return *this;
}
-bool Inventory::operator == (const Inventory &other)
+bool Inventory::operator == (const Inventory &other) const
{
if(m_lists.size() != other.m_lists.size())
return false;