Changeset - r11374:8537c0e815d5
[Not reviewed]
master
0 1 0
rubidium - 16 years ago 2009-03-15 21:16:07
rubidium@openttd.org
(svn r15729) -Fix: silence MSVC warning
1 file changed with 8 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/town_cmd.cpp
Show inline comments
 
@@ -1374,15 +1374,16 @@ extern int _nb_orig_names;
 
 * Speeds things up a bit because these values are computed only once per name generation.
 
 */
 
struct TownNameParams {
 
	bool grf;            ///< true iff a newgrf is used to generate town name
 
	uint32 grfid;        ///< newgrf ID
 
	uint16 townnametype; ///< town name style
 

	
 
	TownNameParams(byte town_name) :
 
		grf(town_name >= _nb_orig_names),
 
		grfid(this->grf ? GetGRFTownNameId(town_name - _nb_orig_names) : 0),
 
		townnametype(this->grf ? GetGRFTownNameType(town_name - _nb_orig_names) : SPECSTR_TOWNNAME_START + town_name)
 
	{ }
 
	bool grf;            ///< true iff a newgrf is used to generate town name
 

	
 
	TownNameParams(byte town_name)
 
	{
 
		this->grf = town_name >= _nb_orig_names;
 
		this->grfid = this->grf ? GetGRFTownNameId(town_name - _nb_orig_names) : 0;
 
		this->townnametype = this->grf ? GetGRFTownNameType(town_name - _nb_orig_names) : SPECSTR_TOWNNAME_START + town_name;
 
	}
 
};
 

	
 
/**
0 comments (0 inline, 0 general)