* Get the language with the given NewGRF language ID. * @param newgrflangid NewGRF languages ID to check. * @return The language's metadata, or nullptr if it is not known. */
| 2182 | * @return The language's metadata, or nullptr if it is not known. |
| 2183 | */ |
| 2184 | const LanguageMetadata *GetLanguage(uint8_t newgrflangid) |
| 2185 | { |
| 2186 | for (const LanguageMetadata &lang : _languages) { |
| 2187 | if (newgrflangid == lang.newgrflangid) return ⟨ |
| 2188 | } |
| 2189 | |
| 2190 | return nullptr; |
| 2191 | } |
| 2192 | |
| 2193 | /** |
| 2194 | * Reads the language file header and checks compatibility. |
no outgoing calls
no test coverage detected