mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 15:03:45 +08:00
Reduce size of TessResultRenderer
Changing the order reduces the size from 72 to 64 bytes on 64 bit Linux. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
95223cfaab
commit
5f10fed5d9
@ -141,12 +141,12 @@ protected:
|
||||
void AppendData(const char *s, int len);
|
||||
|
||||
private:
|
||||
TessResultRenderer *next_; // Can link multiple renderers together
|
||||
FILE *fout_; // output file pointer
|
||||
const char *file_extension_; // standard extension for generated output
|
||||
std::string title_; // title of document being rendered
|
||||
int imagenum_; // index of last image added
|
||||
|
||||
FILE *fout_; // output file pointer
|
||||
TessResultRenderer *next_; // Can link multiple renderers together
|
||||
bool happy_; // I get grumpy when the disk fills up, etc.
|
||||
};
|
||||
|
||||
|
@ -31,11 +31,11 @@ namespace tesseract {
|
||||
* Base Renderer interface implementation
|
||||
**********************************************************************/
|
||||
TessResultRenderer::TessResultRenderer(const char *outputbase, const char *extension)
|
||||
: file_extension_(extension)
|
||||
: next_(nullptr)
|
||||
, fout_(stdout)
|
||||
, file_extension_(extension)
|
||||
, title_("")
|
||||
, imagenum_(-1)
|
||||
, fout_(stdout)
|
||||
, next_(nullptr)
|
||||
, happy_(true) {
|
||||
if (strcmp(outputbase, "-") && strcmp(outputbase, "stdout")) {
|
||||
std::string outfile = std::string(outputbase) + "." + extension;
|
||||
|
Loading…
Reference in New Issue
Block a user