TODO(rays) Change all callers to use TFile and remove the old functions. Writes to the given file. Returns false in case of error.
| 146 | // TODO(rays) Change all callers to use TFile and remove the old functions. |
| 147 | // Writes to the given file. Returns false in case of error. |
| 148 | bool STRING::Serialize(FILE* fp) const { |
| 149 | inT32 len = length(); |
| 150 | if (fwrite(&len, sizeof(len), 1, fp) != 1) return false; |
| 151 | if (static_cast<int>(fwrite(GetCStr(), 1, len, fp)) != len) return false; |
| 152 | return true; |
| 153 | } |
| 154 | // Writes to the given file. Returns false in case of error. |
| 155 | bool STRING::Serialize(TFile* fp) const { |
| 156 | inT32 len = length(); |