summaryrefslogtreecommitdiff
path: root/src/resources/db/groupdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db/groupdb.cpp')
-rw-r--r--src/resources/db/groupdb.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/db/groupdb.cpp b/src/resources/db/groupdb.cpp
index fc61033cc..7b499018a 100644
--- a/src/resources/db/groupdb.cpp
+++ b/src/resources/db/groupdb.cpp
@@ -372,6 +372,17 @@ const std::string &GroupDb::getBadge(const int id)
return (*it).second->badge;
}
+const GroupInfo *GroupDb::getGroup(const int id)
+{
+ GroupInfos::const_iterator it = mGroups.find(id);
+ if (it == mGroups.end())
+ {
+ reportAlways("Unknown group id requested: %d", id);
+ return &mEmptyGroup;
+ }
+ return (*it).second;
+}
+
#ifdef UNITTESTS
GroupDb::GroupInfos &GroupDb::getGroups()
{