From 968e3cddbd3394607ae34f56ba8ee12d78bad1a5 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 14 Jul 2016 02:53:07 +0200 Subject: Changed various functions to take a const sd - Affected functions: pc->nextbaseex(), pc->nextjobexp(), pc->thisbaseexp(), pc->thisjobexp(), pc->readparam() - Fixes an accidental '+=' in pc->readparam() due to copy-paste failure, detected thanks to the const enforcement (luckily it had no current ill effects, since the value was 0) Signed-off-by: Haru --- src/map/pc.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/map/pc.h') diff --git a/src/map/pc.h b/src/map/pc.h index f3b2c1ff6..a3a7b780d 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -914,10 +914,10 @@ END_ZEROED_BLOCK; /* End */ int (*checkbaselevelup) (struct map_session_data *sd); int (*checkjoblevelup) (struct map_session_data *sd); bool (*gainexp) (struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); - unsigned int (*nextbaseexp) (struct map_session_data *sd); - unsigned int (*thisbaseexp) (struct map_session_data *sd); - unsigned int (*nextjobexp) (struct map_session_data *sd); - unsigned int (*thisjobexp) (struct map_session_data *sd); + unsigned int (*nextbaseexp) (const struct map_session_data *sd); + unsigned int (*thisbaseexp) (const struct map_session_data *sd); + unsigned int (*nextjobexp) (const struct map_session_data *sd); + unsigned int (*thisjobexp) (const struct map_session_data *sd); int (*gets_status_point) (int level); int (*need_status_point) (struct map_session_data *sd,int type,int val); int (*maxparameterincrease) (struct map_session_data* sd, int type); @@ -958,7 +958,7 @@ END_ZEROED_BLOCK; /* End */ int (*changelook) (struct map_session_data *sd,int type,int val); int (*equiplookall) (struct map_session_data *sd); - int (*readparam) (struct map_session_data *sd,int type); + int (*readparam) (const struct map_session_data *sd, int type); int (*setparam) (struct map_session_data *sd,int type,int val); int (*readreg) (struct map_session_data *sd, int64 reg); void (*setreg) (struct map_session_data *sd, int64 reg,int val); -- cgit v1.2.3-60-g2f50