diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-23 00:07:19 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-23 00:07:19 -0800 |
commit | b71fe38f3c177a6a912b9c80f5c32ae0a85edb75 (patch) | |
tree | 1ccc77ee6fbdd93d681b120a6f589ae55ba6690f /crawl-ref/source/directn.cc | |
parent | 99426d184cb992f9839f0c17d393c0c188244e45 (diff) | |
download | crawl-ref-b71fe38f3c177a6a912b9c80f5c32ae0a85edb75.tar.gz crawl-ref-b71fe38f3c177a6a912b9c80f5c32ae0a85edb75.zip |
Give "struct dist" a constructor, for initing
Fix Valgrind warnings about uninialized values in the dist struct (now
class) by giving it a constrcutor which initializes all values.
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 665f41c81b..7545738668 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -129,6 +129,13 @@ static void _describe_oos_square(const coord_def& where); static void _extend_move_to_edge(dist &moves); static std::string _get_monster_desc(const monsters *mon); +dist::dist() + : isValid(false), isTarget(false), isMe(false), isEndpoint(false), + isCancel(true), choseRay(false), target(), delta(), ray(), + prev_target(MHITNOT) +{ +} + void direction_choose_compass( dist& moves, targetting_behaviour *beh) { moves.isValid = true; |