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:
Stefan Weil 2021-08-07 22:09:58 +02:00
parent 95223cfaab
commit 5f10fed5d9
2 changed files with 5 additions and 5 deletions

View File

@ -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.
};

View File

@ -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;