Author: crab
Date: Thu Jun  4 21:37:39 2009
New Revision: 36061

URL: http://svn.gna.org/viewcvs/wesnoth?rev=36061&view=rev
Log:
AI refactoring: ai_registry -> ai::registry

Modified:
    trunk/src/ai/ai_manager.cpp
    trunk/src/ai/registry.cpp
    trunk/src/ai/registry.hpp

Modified: trunk/src/ai/ai_manager.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_manager.cpp?rev=36061&r1=36060&r2=36061&view=diff
==============================================================================
--- trunk/src/ai/ai_manager.cpp (original)
+++ trunk/src/ai/ai_manager.cpp Thu Jun  4 21:37:39 2009
@@ -290,7 +290,7 @@
                clear_ai_info();
        }
        ai_info_ = new game_info(i);
-       ai_registry::init();
+       registry::init();
 }
 
 

Modified: trunk/src/ai/registry.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/registry.cpp?rev=36061&r1=36060&r2=36061&view=diff
==============================================================================
--- trunk/src/ai/registry.cpp (original)
+++ trunk/src/ai/registry.cpp Thu Jun  4 21:37:39 2009
@@ -28,6 +28,7 @@
 #include "testing/stage_rca.hpp"
 #include "testing/stage_fallback.hpp"
 
+namespace ai {
 // =======================================================================
 // AIs
 // =======================================================================
@@ -44,33 +45,35 @@
 // Engines
 // =======================================================================
 
-static ai::composite_ai::register_engine_factory<ai::composite_ai::engine_cpp>
+static composite_ai::register_engine_factory<composite_ai::engine_cpp>
        composite_ai_factory("cpp");
 
 // =======================================================================
 // Stages
 // =======================================================================
-static 
ai::composite_ai::register_stage_factory<testing_ai_default::candidate_action_evaluation_loop>
+static 
composite_ai::register_stage_factory<testing_ai_default::candidate_action_evaluation_loop>
        
candidate_action_evaluation_loop_factory("testing_ai_default::candidate_action_evaluation_loop");
 
-static 
ai::composite_ai::register_stage_factory<testing_ai_default::fallback_to_other_ai>
+static 
composite_ai::register_stage_factory<testing_ai_default::fallback_to_other_ai>
        fallback_to_other_ai_factory("testing_ai_default::fallback");
 
 // =======================================================================
 // Candidate actions
 // =======================================================================
 
-static 
ai::composite_ai::register_candidate_action_factory<testing_ai_default::goto_phase>
+static 
composite_ai::register_candidate_action_factory<testing_ai_default::goto_phase>
        goto_phase_factory("testing_ai_default::goto_phase");
 
-static 
ai::composite_ai::register_candidate_action_factory<testing_ai_default::recruitment_phase>
+static 
composite_ai::register_candidate_action_factory<testing_ai_default::recruitment_phase>
        recruitment_phase_factory("testing_ai_default::recruitment_phase");
 
 
-void ai_registry::init()
+void registry::init()
 {
 }
 
-ai_registry::ai_registry()
+registry::registry()
 {
 }
+
+} //end of namespace ai

Modified: trunk/src/ai/registry.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/registry.hpp?rev=36061&r1=36060&r2=36061&view=diff
==============================================================================
--- trunk/src/ai/registry.hpp (original)
+++ trunk/src/ai/registry.hpp Thu Jun  4 21:37:39 2009
@@ -22,12 +22,15 @@
 
 #include "../global.hpp"
 
+namespace ai {
 
-class ai_registry{
+class registry{
 public:
        static void init();
 private:
-       ai_registry();
+       registry();
 };
 
+} //end of namespace ai
+
 #endif


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

Reply via email to