Author: mordante
Date: Sun Jun 22 14:32:57 2008
New Revision: 27406

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27406&view=rev
Log:
Added constructor to initialize all members.

Modified:
    trunk/src/ai.hpp

Modified: trunk/src/ai.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai.hpp?rev=27406&r1=27405&r2=27406&view=diff
==============================================================================
--- trunk/src/ai.hpp (original)
+++ trunk/src/ai.hpp Sun Jun 22 14:32:57 2008
@@ -130,6 +130,27 @@
 public:
        struct attack_analysis : public game_logic::formula_callable
        {
+               attack_analysis() : 
+                       game_logic::formula_callable(),
+                       target(),
+                       movements(),
+                       target_value(0.0),
+                       avg_losses(0.0),
+                       chance_to_kill(0.0),
+                       avg_damage_inflicted(0.0),
+                       target_starting_damage(0.0),
+                       avg_damage_taken(0.0),
+                       resources_used(0.0),
+                       terrain_quality(0.0),
+                       alternative_terrain_quality(0.0),
+                       vulnerability(0.0),
+                       support(0.0),
+                       leader_threat(false),
+                       uses_leader(false),
+                       is_surrounded(false)
+               {
+               }
+
                void analyze(const gamemap& map, unit_map& units,
                                         const std::vector<team>& teams,
                                         const gamestatus& status,


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to