mail[Wesnoth-commits] r24743 - in /trunk/src: generate_report.cpp reports.cpp reports.hpp


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

Header


Content

Posted by esr on March 17, 2008 - 13:28:
Author: esr
Date: Mon Mar 17 13:28:38 2008
New Revision: 24743

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24743&view=rev
Log:
Remove so-called 'backward-compatibility' code that was throwing false
positives (complaining about nonexistent unit_description tags)
without, as far as I can tell, actually doing anything.

Modified:
    trunk/src/generate_report.cpp
    trunk/src/reports.cpp
    trunk/src/reports.hpp

Modified: trunk/src/generate_report.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/generate_report.cpp?rev=24743&r1=24742&r2=24743&view=diff
==============================================================================
--- trunk/src/generate_report.cpp (original)
+++ trunk/src/generate_report.cpp Mon Mar 17 13:28:38 2008
@@ -59,9 +59,6 @@
        std::stringstream str;
 
        switch(type) {
-       // this one is for backward compatibility (should be removed in 
v1.5.3)
-       case UNIT_NAME_OLD:
-               std::cerr << "warning: ThemeWML [unit_description] tag will 
be removed in 1.5.3, run wmllint" << std::endl;
        case UNIT_NAME:
                return report(u->second.name(),"",u->second.name());
        case UNIT_TYPE:

Modified: trunk/src/reports.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/reports.cpp?rev=24743&r1=24742&r2=24743&view=diff
==============================================================================
--- trunk/src/reports.cpp (original)
+++ trunk/src/reports.cpp Mon Mar 17 13:28:38 2008
@@ -20,8 +20,7 @@
 #include <map>
 
 namespace {
-       // the first one is for backward compatibility (should be removed in 
v1.5.3)
-       const std::string report_names[] = { "unit_description", 
+       const std::string report_names[] = {
                "unit_name", "unit_type",
                "unit_race", "unit_level", "unit_side", "unit_amla",
                "unit_traits", "unit_status", "unit_alignment", 
"unit_abilities",

Modified: trunk/src/reports.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/reports.hpp?rev=24743&r1=24742&r2=24743&view=diff
==============================================================================
--- trunk/src/reports.hpp (original)
+++ trunk/src/reports.hpp Mon Mar 17 13:28:38 2008
@@ -25,9 +25,7 @@
 //this module is responsible for outputting textual reports of
 //various game and unit statistics
 namespace reports {
-       // the first one is for backward compatibility (should be removed in 
v1.5.3)    
-       enum TYPE { UNIT_NAME_OLD, 
-                   UNIT_NAME, UNIT_TYPE, UNIT_RACE, UNIT_LEVEL,
+       enum TYPE { UNIT_NAME, UNIT_TYPE, UNIT_RACE, UNIT_LEVEL,
                    UNIT_SIDE, UNIT_AMLA, UNIT_TRAITS, UNIT_STATUS,
                    UNIT_ALIGNMENT, UNIT_ABILITIES, UNIT_HP, UNIT_XP,
                    UNIT_ADVANCEMENT_OPTIONS, UNIT_MOVES, UNIT_WEAPONS,
@@ -37,8 +35,8 @@
                    REPORT_COUNTDOWN, REPORT_CLOCK, SELECTED_TERRAIN,
                    EDIT_LEFT_BUTTON_FUNCTION, NUM_REPORTS};
 
-       enum { UNIT_REPORTS_BEGIN=UNIT_NAME_OLD, 
UNIT_REPORTS_END=UNIT_PROFILE+1 };
-       enum { STATUS_REPORTS_BEGIN=TIME_OF_DAY, 
STATUS_REPORTS_END=NUM_REPORTS};
+       enum { UNIT_REPORTS_BEGIN=UNIT_NAME, UNIT_REPORTS_END=UNIT_PROFILE+1 
};
+       enum { STATUS_REPORTS_BEGIN=TIME_OF_DAY, 
STATUS_REPORTS_END=NUM_REPORTS };
 
        const std::string& report_name(TYPE type);
 




Related Messages


Powered by MHonArc, Updated Mon Mar 17 14:21:25 2008