diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-02 14:38:19 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-02 14:38:19 +0000 |
commit | f7965ece5af757bfe975e9c2b39935447a082945 (patch) | |
tree | 2a03f01fac2458b9269897320b82e44151a5849f /crawl-ref/source/religion.cc | |
parent | 9ecccc3bd4aa269a6d219bc6c097d494ddaeb50d (diff) | |
download | crawl-ref-f7965ece5af757bfe975e9c2b39935447a082945.tar.gz crawl-ref-f7965ece5af757bfe975e9c2b39935447a082945.zip |
Fix potential warnings.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4805 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 3b35d2d870..ae2e05a4d6 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1097,11 +1097,6 @@ bool bless_follower(int follower, bool (*suitable)(const monsters* mon), bool force) { - std::string result; - monsters *mon; - - int chance = (force ? coinflip() : random2(20)); - // If a follower was specified, and it's suitable, pick it. // Otherwise, pick a random follower within sight of the player. if (follower == -1 || (!force && !suitable(&menv[follower]))) @@ -1157,7 +1152,10 @@ bool bless_follower(int follower, ASSERT(follower != -1 && follower != NON_MONSTER); // Else, apply blessing to chosen follower. - mon = &menv[follower]; + monsters *mon = &menv[follower]; + + int chance = (force ? coinflip() : random2(20)); + std::string result; if (chance == 0) // 5% chance of holy branding, or priesthood { |