File diff r23537:f6a6d4ce4bd5 → r23538:8df50944b27a
src/newgrf_text.cpp
Show inline comments
 
@@ -164,13 +164,13 @@ static byte _currentLangID = GRFLX_ENGLI
 
 * @param newgrf_id The NewGRF ID to map.
 
 * @param gender    Whether to map genders or cases.
 
 * @return The, to OpenTTD's internal ID, mapped index, or -1 if there is no mapping.
 
 */
 
int LanguageMap::GetMapping(int newgrf_id, bool gender) const
 
{
 
	const SmallVector<Mapping, 1> &map = gender ? this->gender_map : this->case_map;
 
	const std::vector<Mapping> &map = gender ? this->gender_map : this->case_map;
 
	for (const Mapping &m : map) {
 
		if (m.newgrf_id == newgrf_id) return m.openttd_id;
 
	}
 
	return -1;
 
}
 

	
 
@@ -179,13 +179,13 @@ int LanguageMap::GetMapping(int newgrf_i
 
 * @param openttd_id The OpenTTD ID to map.
 
 * @param gender     Whether to map genders or cases.
 
 * @return The, to the NewGRF supplied ID, mapped index, or -1 if there is no mapping.
 
 */
 
int LanguageMap::GetReverseMapping(int openttd_id, bool gender) const
 
{
 
	const SmallVector<Mapping, 1> &map = gender ? this->gender_map : this->case_map;
 
	const std::vector<Mapping> &map = gender ? this->gender_map : this->case_map;
 
	for (const Mapping &m : map) {
 
		if (m.openttd_id == openttd_id) return m.newgrf_id;
 
	}
 
	return -1;
 
}