(svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int

This commit is contained in:
rubidium
2010-05-13 10:14:29 +00:00
parent fc13802c72
commit a70fd540fc
30 changed files with 82 additions and 125 deletions

View File

@@ -126,10 +126,8 @@ struct CargoSummaryItem {
}
};
enum {
TRAIN_DETAILS_MIN_INDENT = 32, ///< Minimum indent level in the train details window
TRAIN_DETAILS_MAX_INDENT = 72, ///< Maximum indent level in the train details window; wider than this and we start on a new line
};
static const uint TRAIN_DETAILS_MIN_INDENT = 32; ///< Minimum indent level in the train details window
static const uint TRAIN_DETAILS_MAX_INDENT = 72; ///< Maximum indent level in the train details window; wider than this and we start on a new line
/** Container for the cargo summary information. */
typedef SmallVector<CargoSummaryItem, 2> CargoSummary;
@@ -307,7 +305,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po
GetCargoSummaryOfArticulatedVehicle(v, &_cargo_summary);
/* Draw sprites */
int dx = 0;
uint dx = 0;
int px = x;
const Train *u = v;
do {