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.
This commit is contained in:
Eric S. Raymond 2008-03-17 12:28:38 +00:00
parent 39733d0ed1
commit 9da6ddbd44
3 changed files with 4 additions and 10 deletions

View file

@ -59,9 +59,6 @@ report generate_report(TYPE type,
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:

View file

@ -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",

View file

@ -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 @@ namespace reports {
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);