summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskyleo <skyleo@skyleo.de>2019-11-17 13:43:56 +0100
committerHaru <haru@dotalux.com>2020-03-08 20:59:35 +0100
commit01f807099010544eadc1327124cf3772ca0952d6 (patch)
treea00ce9b100d0786d9bd1fa7dadfc9ef0d56d4b53 /src/map
parent1d17449c0cb809cec8ca16f2ac860f6377bfa305 (diff)
downloadhercules-01f807099010544eadc1327124cf3772ca0952d6.tar.gz
hercules-01f807099010544eadc1327124cf3772ca0952d6.tar.bz2
hercules-01f807099010544eadc1327124cf3772ca0952d6.tar.xz
hercules-01f807099010544eadc1327124cf3772ca0952d6.zip
Change src parameter to be const in map_calc_dir
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.c2
-rw-r--r--src/map/map.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index e0ab2b08d..defa56b2e 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2874,7 +2874,7 @@ static int map_check_dir(enum unit_dir s_dir, enum unit_dir t_dir)
* @param y: y-coordinate of cell
* @return the direction of the given cell, relative to 'src'
**/
-static enum unit_dir map_calc_dir(struct block_list *src, int16 x, int16 y)
+static enum unit_dir map_calc_dir(const struct block_list *src, int16 x, int16 y)
{
nullpo_retr(UNIT_DIR_NORTH, src);
enum unit_dir dir = UNIT_DIR_NORTH;
diff --git a/src/map/map.h b/src/map/map.h
index e0fbcf9b2..a876539d0 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1218,7 +1218,7 @@ END_ZEROED_BLOCK;
void (*reloadnpc) (bool clear);
int (*check_dir) (enum unit_dir s_dir, enum unit_dir t_dir);
- enum unit_dir (*calc_dir) (struct block_list *src, int16 x, int16 y);
+ enum unit_dir (*calc_dir) (const struct block_list *src, int16 x, int16 y);
int (*random_dir) (struct block_list *bl, short *x, short *y); // [Skotlex]
int (*cleanup_sub) (struct block_list *bl, va_list ap);