diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-11-05 22:52:27 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-11-06 00:16:02 +0100 |
commit | 35b2e96e519219400a89e1c660b9f7f7d5f5345d (patch) | |
tree | 78aa682b277ee12b6e94f786bc482863d8d6a197 /crawl-ref/source/mon-abil.h | |
parent | f40b9beb8de1c6679f4136ccd2a8c33a754698c5 (diff) | |
download | crawl-ref-35b2e96e519219400a89e1c660b9f7f7d5f5345d.tar.gz crawl-ref-35b2e96e519219400a89e1c660b9f7f7d5f5345d.zip |
Don't copy the entire monster whenever one of several properties is queried.
With lots of monsters of view, ~15% of time was spent just doing this copy.
In all of those cases, it's a read-only operation, so a const pointer is just
as good.
Diffstat (limited to 'crawl-ref/source/mon-abil.h')
-rw-r--r-- | crawl-ref/source/mon-abil.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-abil.h b/crawl-ref/source/mon-abil.h index d8904186d6..be76913a43 100644 --- a/crawl-ref/source/mon-abil.h +++ b/crawl-ref/source/mon-abil.h @@ -21,7 +21,7 @@ void ballisto_on_move(monster* mons, const coord_def & pos); void activate_ballistomycetes(monster* mons, const coord_def & origin, bool player_kill); -bool valid_kraken_connection(monster* mons); +bool valid_kraken_connection(const monster* mons); void move_kraken_tentacles(monster * kraken); bool valid_demonic_connection(monster* mons); void move_demon_tentacle(monster * tentacle); |