MCPcopy Create free account
hub / github.com/creatale/node-dv / Serialize

Method Serialize

deps/tesseract/ccutil/strngs.cpp:148–153  ·  view source on GitHub ↗

TODO(rays) Change all callers to use TFile and remove the old functions. Writes to the given file. Returns false in case of error.

Source from the content-addressed store, hash-verified

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.
148bool 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.
155bool STRING::Serialize(TFile* fp) const {
156 inT32 len = length();

Callers

nothing calls this directly

Calls 3

GetCStrFunction · 0.85
FWriteMethod · 0.80
lengthFunction · 0.50

Tested by

no test coverage detected