From d4ee190ca1d37174da5692a3f391e12d46fe6ea5 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 25 Nov 2012 21:28:15 +0000 Subject: Cleaned up slots API. --- src/core/slots.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/core/slots.cc') 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 -- cgit v1.2.3