summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-07-29 22:23:07 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-07-31 04:12:23 +0200
commit2e76cfd839a904a35b6f407666c80403d83974af (patch)
treea27bb7174088d4a7a25b00df3f28e32ed76a99e0 /crawl-ref/source/religion.h
parent5e2a970f1475e397300623dae72b4f85106d5d93 (diff)
downloadcrawl-ref-2e76cfd839a904a35b6f407666c80403d83974af.tar.gz
crawl-ref-2e76cfd839a904a35b6f407666c80403d83974af.zip
Let the compiler inline new trivial accessors.
Not sure if religion is queried from any tight loops, but this doesn't hurt, and servers don't use LTO yet.
Diffstat (limited to 'crawl-ref/source/religion.h')
-rw-r--r--crawl-ref/source/religion.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index c5ac3d4645..52082de71c 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -54,7 +54,12 @@ int god_colour(god_type god);
colour_t god_message_altar_colour(god_type god);
bool player_can_join_god(god_type which_god);
void god_pitch(god_type which_god);
-bool you_worship(god_type god);
+
+static inline bool you_worship(god_type god)
+{
+ return you.religion == god;
+}
+
int had_gods();
int piety_rank(int piety = -1);
int piety_scale(int piety_change);