mail[Wesnoth-commits] r37029 - in /trunk/src: play_controller.cpp play_controller.hpp replay.cpp replay.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on July 19, 2009 - 09:48:
Author: silene
Date: Sun Jul 19 09:48:46 2009
New Revision: 37029

URL: http://svn.gna.org/viewcvs/wesnoth?rev=37029&view=rev
Log:
Removed useless class verification_manager.

Modified:
    trunk/src/play_controller.cpp
    trunk/src/play_controller.hpp
    trunk/src/replay.cpp
    trunk/src/replay.hpp

Modified: trunk/src/play_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.cpp?rev=37029&r1=37028&r2=37029&view=diff
==============================================================================
--- trunk/src/play_controller.cpp (original)
+++ trunk/src/play_controller.cpp Sun Jul 19 09:48:46 2009
@@ -43,7 +43,6 @@
                int ticks, int num_turns, const config& game_config, CVideo& 
video,
                bool skip_replay) :
        controller_base(ticks, game_config, video),
-       verify_manager_(units_),
        team_manager_(teams_),
        prefs_disp_manager_(),
        tooltips_manager_(),

Modified: trunk/src/play_controller.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.hpp?rev=37029&r1=37028&r2=37029&view=diff
==============================================================================
--- trunk/src/play_controller.hpp (original)
+++ trunk/src/play_controller.hpp Sun Jul 19 09:48:46 2009
@@ -147,7 +147,6 @@
        int find_human_team_before(const size_t team) const;
 
        //managers
-       const verification_manager verify_manager_;
        teams_manager team_manager_;
        boost::scoped_ptr<preferences::display_manager> prefs_disp_manager_;
        boost::scoped_ptr<tooltips::manager> tooltips_manager_;

Modified: trunk/src/replay.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay.cpp?rev=37029&r1=37028&r2=37029&view=diff
==============================================================================
--- trunk/src/replay.cpp (original)
+++ trunk/src/replay.cpp Sun Jul 19 09:48:46 2009
@@ -110,27 +110,6 @@
        LOG_REPLAY << "verification passed\n";
 }
 
-namespace {
-       const unit_map* unit_map_ref = NULL;
-}
-
-static void verify_units(const config& cfg)
-       {
-               if(unit_map_ref != NULL) {
-                       verify(*unit_map_ref,cfg);
-               }
-       }
-
-verification_manager::verification_manager(const unit_map& units)
-{
-       unit_map_ref = &units;
-}
-
-verification_manager::~verification_manager()
-{
-       unit_map_ref = NULL;
-}
-
 // FIXME: this one now has to be assigned with set_random_generator
 // from play_level or similar.  We should surely hunt direct
 // references to it from this very file and move it out of here.
@@ -174,11 +153,10 @@
        if(! game_config::mp_debug) {
                return;
        }
-       assert(unit_map_ref);
        config& cc = cfg->add_child("checksum");
        loc.write(cc);
-       unit_map::const_iterator u = unit_map_ref->find(loc);
-       assert(u != unit_map_ref->end());
+       unit_map::const_iterator u = resources::units->find(loc);
+       assert(u.valid());
        cc["value"] = get_checksum(u->second);
 }
 
@@ -890,7 +868,7 @@
                else if (cfg->child("end_turn"))
                {
                        if (const config &child = cfg->child("verify")) {
-                               verify_units(child);
+                               verify(*resources::units, child);
                        }
 
                        THROW_END_LEVEL_DELETE(delayed_exception);
@@ -1171,7 +1149,7 @@
                }
 
                if (const config &child = cfg->child("verify")) {
-                       verify_units(child);
+                       verify(*resources::units, child);
                }
        }
 

Modified: trunk/src/replay.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay.hpp?rev=37029&r1=37028&r2=37029&view=diff
==============================================================================
--- trunk/src/replay.hpp (original)
+++ trunk/src/replay.hpp Sun Jul 19 09:48:46 2009
@@ -28,12 +28,6 @@
 class terrain_label;
 class unit_map;
 class play_controller;
-
-struct verification_manager
-{
-       verification_manager(const unit_map& units);
-       ~verification_manager();
-};
 
 class replay: public rand_rng::rng
 {




Related Messages


Powered by MHonArc, Updated Sun Jul 19 10:00:58 2009