* Obtain a NewGRF file by its filename * @param filename The filename to obtain the file for. * @return The file. */
| 114 | * @return The file. |
| 115 | */ |
| 116 | static GRFFile *GetFileByFilename(const std::string &filename) |
| 117 | { |
| 118 | auto it = std::ranges::find(_grf_files, filename, &GRFFile::filename); |
| 119 | if (it != std::end(_grf_files)) return &*it; |
| 120 | return nullptr; |
| 121 | } |
| 122 | |
| 123 | /** Reset all NewGRFData that was used only while processing data */ |
| 124 | static void ClearTemporaryNewGRFData(GRFFile *gf) |
no test coverage detected