summaryrefslogtreecommitdiff
path: root/src/map/magic-expr.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-15 20:05:17 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-19 20:09:35 -0700
commitceeda2e337077b2edaf1af09cc4df2c30e8205a1 (patch)
treeab7a70020e1dcac9ee56531c1c5af9888989f4f3 /src/map/magic-expr.cpp
parent147c3e9c891c12dbfd39b65ee0f5baddf5f81b14 (diff)
downloadtmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.tar.gz
tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.tar.bz2
tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.tar.xz
tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.zip
Wouldn't it be nice to have some integers too?
Diffstat (limited to 'src/map/magic-expr.cpp')
-rw-r--r--src/map/magic-expr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp
index 786f870..b6f3208 100644
--- a/src/map/magic-expr.cpp
+++ b/src/map/magic-expr.cpp
@@ -504,14 +504,14 @@ int fun_bitshr(dumb_ptr<env_t>, val_t *result, Slice<val_t> args)
static
int fun_max(dumb_ptr<env_t>, val_t *result, Slice<val_t> args)
{
- RESULTINT = max(ARGINT(0), ARGINT(1));
+ RESULTINT = std::max(ARGINT(0), ARGINT(1));
return 0;
}
static
int fun_min(dumb_ptr<env_t>, val_t *result, Slice<val_t> args)
{
- RESULTINT = min(ARGINT(0), ARGINT(1));
+ RESULTINT = std::min(ARGINT(0), ARGINT(1));
return 0;
}
@@ -639,7 +639,7 @@ int fun_skill(dumb_ptr<env_t>, val_t *result, Slice<val_t> args)
if (ENTITY_TYPE(0) != BL::PC
// don't convert to enum until after the range check
|| ARGINT(1) < 0
- || ARGINT(1) >= uint16_t(MAX_SKILL))
+ || ARGINT(1) >= static_cast<uint16_t>(MAX_SKILL))
{
RESULTINT = 0;
}
@@ -944,7 +944,7 @@ int fun_distance(dumb_ptr<env_t>, val_t *result, Slice<val_t> args)
if (ARGLOCATION(0).m != ARGLOCATION(1).m)
RESULTINT = 0x7fffffff;
else
- RESULTINT = max(abs(ARGLOCATION(0).x - ARGLOCATION(1).x),
+ RESULTINT = std::max(abs(ARGLOCATION(0).x - ARGLOCATION(1).x),
abs(ARGLOCATION(0).y - ARGLOCATION(1).y));
return 0;
}