Reads from the given file. Returns false in case of error. If swap is true, assumes a big/little-endian swap is needed.
| 72 | // Reads from the given file. Returns false in case of error. |
| 73 | // If swap is true, assumes a big/little-endian swap is needed. |
| 74 | bool UnicharAndFonts::DeSerialize(bool swap, FILE* fp) { |
| 75 | if (fread(&unichar_id, sizeof(unichar_id), 1, fp) != 1) return false; |
| 76 | if (swap) |
| 77 | ReverseN(&unichar_id, sizeof(unichar_id)); |
| 78 | if (!font_ids.DeSerialize(swap, fp)) return false; |
| 79 | return true; |
| 80 | } |
| 81 | |
| 82 | // Sort function to sort a pair of UnicharAndFonts by unichar_id. |
| 83 | int UnicharAndFonts::SortByUnicharId(const void* v1, const void* v2) { |
no test coverage detected