summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-16 09:11:26 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-16 09:12:13 -0600
commite8dd52d8264cd0eec1f5d32c1f809a164e2d2f59 (patch)
tree2b4a92f04d0642cbd4b557b12f5de9ef31d63f2a /src
parent86b5f4b9183a2567a2b9c486a00465446206bbba (diff)
downloadmana-e8dd52d8264cd0eec1f5d32c1f809a164e2d2f59.tar.gz
mana-e8dd52d8264cd0eec1f5d32c1f809a164e2d2f59.tar.bz2
mana-e8dd52d8264cd0eec1f5d32c1f809a164e2d2f59.tar.xz
mana-e8dd52d8264cd0eec1f5d32c1f809a164e2d2f59.zip
Fix an oddity in PartyWindow
Diffstat (limited to 'src')
-rw-r--r--src/gui/partywindow.cpp10
-rw-r--r--src/gui/partywindow.h6
2 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp
index 9c2d3161..08698dab 100644
--- a/src/gui/partywindow.cpp
+++ b/src/gui/partywindow.cpp
@@ -54,6 +54,16 @@ void PartyWindow::draw(gcn::Graphics *graphics)
Window::draw(graphics);
}
+PartyMember *PartyWindow::findMember(int id)
+{
+ PartyList::iterator it = mMembers.find(id);
+
+ if (it == mMembers.end())
+ return NULL;
+ else
+ return it->second;
+}
+
PartyMember *PartyWindow::findMember2(int id)
{
PartyMember *member = findMember(id);
diff --git a/src/gui/partywindow.h b/src/gui/partywindow.h
index b1967b0e..60c4da29 100644
--- a/src/gui/partywindow.h
+++ b/src/gui/partywindow.h
@@ -72,12 +72,12 @@ class PartyWindow : public Window, gcn::ActionListener
void draw(gcn::Graphics *graphics);
/**
- * Find a party member based on ID
+ * Find a party member based on ID. Returns NULL if not found.
*/
- PartyMember *findMember(int id) { return mMembers[id]; }
+ PartyMember *findMember(int id);
/**
- * Find a party member based on ID. Creates if it doesn't already exist.
+ * Find a party member based on ID. Creates if not found.
*/
PartyMember *findMember2(int id);