Helper: Get the CRC32 of a given file as a hex string
| 55 | |
| 56 | // Helper: Get the CRC32 of a given file as a hex string |
| 57 | std::string crc32file(std::string file_name) { |
| 58 | if (!file_name.empty()) { |
| 59 | auto in = FileFinder::Game().OpenInputStream(file_name); |
| 60 | if (in) { |
| 61 | auto crc = Utils::CRC32(in); |
| 62 | std::stringstream res; |
| 63 | res <<std::hex << std::setfill('0') <<std::setw(8) <<crc; |
| 64 | return res.str(); |
| 65 | } |
| 66 | } |
| 67 | return ""; |
| 68 | } |
| 69 | |
| 70 | |
| 71 | Meta::Meta(std::string_view meta_file) { |
no test coverage detected