summaryrefslogtreecommitdiff
path: root/src/monster_type.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-12-11 08:09:30 +0100
committerBardur Arantsson <bardur@scientician.net>2015-12-11 08:09:30 +0100
commit00be445e9127922933dae91a3d68660a57f53c5b (patch)
treea9ce274cb7cdba65e81994e719a8a40a8057d38e /src/monster_type.cc
parentf88c896138589fd2328002a7a4f097c582f79f9b (diff)
Refactor race_info_idx() to avoid "invisible" static pointers
Diffstat (limited to 'src/monster_type.cc')
-rw-r--r--src/monster_type.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/monster_type.cc b/src/monster_type.cc
new file mode 100644
index 00000000..5731e430
--- /dev/null
+++ b/src/monster_type.cc
@@ -0,0 +1,8 @@
+#include "monster_type_fwd.hpp"
+#include "monster_type.hpp"
+#include "monster2.hpp"
+
+std::shared_ptr<monster_race> monster_type::race() const
+{
+ return race_info_idx(r_idx, ego);
+}