summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-10-05 18:45:08 +0200
committerBardur Arantsson <bardur@scientician.net>2016-10-05 18:45:08 +0200
commit561276dc17514fc130b67953b06a3498d6ce23af (patch)
treee65fc2b4dfb8bd2a59e98e89e4ba2ed033c22002 /src
parentd8de8c129fb9fc8d2110f39108949d7025456151 (diff)
Use cbegin() instead of begin() in uniform_element()
Diffstat (limited to 'src')
-rw-r--r--src/z-rand.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/z-rand.hpp b/src/z-rand.hpp
index 235b9503..b04523c3 100644
--- a/src/z-rand.hpp
+++ b/src/z-rand.hpp
@@ -91,7 +91,7 @@ s32b rand_spread(s32b a, s32b d);
**/
template <class C> typename C::const_iterator uniform_element(C const &c)
{
- return c.begin() + rand_int(c.size());
+ return c.cbegin() + rand_int(c.size());
}
/**