Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-11-25 21:28:15 +0000
committerStijn Buys <ingar@osirion.org>2012-11-25 21:28:15 +0000
commitd4ee190ca1d37174da5692a3f391e12d46fe6ea5 (patch)
treec45c9002968f17fffe5bbc29a5e84dcca83bc234 /src/core/slots.cc
parent0d9a69607e7538dc46e685ef8e18b5fa343b6241 (diff)
Cleaned up slots API.
Diffstat (limited to 'src/core/slots.cc')
-rw-r--r--src/core/slots.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/slots.cc b/src/core/slots.cc
index 9bf557f..12f6208 100644
--- a/src/core/slots.cc
+++ b/src/core/slots.cc
@@ -41,6 +41,19 @@ void Slots::clear()
slots_container.clear();
}
+Slot *Slots::find(Item *item)
+{
+ for (iterator it = slots_container.begin(); it != slots_container.end(); ++it)
+ {
+ if ((*it)->item() == item) {
+ return (*it);
+ }
+ }
+
+ return 0;
+
+}
+
} // namespace core