From b533ac13d486a15f2b96803bf2258a014575c464 Mon Sep 17 00:00:00 2001 From: gumi Date: Mon, 15 Apr 2019 13:57:55 -0400 Subject: fix clang warnings --- src/map/clif.cpp | 6 +++--- src/map/pc.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 7d5ff59..1ab6c48 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -3403,13 +3403,13 @@ void clif_sitting(Session *, dumb_ptr sd) case AutoMod::autokill: pc_damage(nullptr, sd, sd->status.hp); clif_displaymessage(sd->sess, "The holy messenger has given judgement."_s); - // now fallthrough to move + FALLTHROUGH; case AutoMod::automove: { unsigned short x0 = std::max(0, sd->bl_x - 5), y0 = std::max(0, sd->bl_y - 5), - x1 = std::min(sd->bl_m->xs, (short)(sd->bl_x + 5)), - y1 = std::min(sd->bl_m->ys, (short)(sd->bl_y + 5)); + x1 = std::min(sd->bl_m->xs, static_cast(sd->bl_x + 5)), + y1 = std::min(sd->bl_m->ys, static_cast(sd->bl_y + 5)); unsigned short x = x0, y = y0; diff --git a/src/map/pc.cpp b/src/map/pc.cpp index b9b41d9..8cd19d9 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -3595,7 +3595,7 @@ int pc_readparam(dumb_ptr bl, SP type) val = sd ? sd->mute.guild : 0; break; case SP::AUTOMOD: - val = sd ? (int)sd->automod : 0; + val = sd ? static_cast(sd->automod) : 0; break; } @@ -3844,7 +3844,7 @@ int pc_setparam(dumb_ptr bl, SP type, int val) break; case SP::AUTOMOD: nullpo_retz(sd); - sd->automod = (AutoMod)val; + sd->automod = static_cast(val); break; } -- cgit v1.2.3-60-g2f50