提交 5f10fed5 编写于 作者: S Stefan Weil

Reduce size of TessResultRenderer

Changing the order reduces the size from 72 to 64 bytes
on 64 bit Linux.
Signed-off-by: NStefan Weil <sw@weilnetz.de>
上级 95223cfa
...@@ -141,12 +141,12 @@ protected: ...@@ -141,12 +141,12 @@ protected:
void AppendData(const char *s, int len); void AppendData(const char *s, int len);
private: private:
TessResultRenderer *next_; // Can link multiple renderers together
FILE *fout_; // output file pointer
const char *file_extension_; // standard extension for generated output const char *file_extension_; // standard extension for generated output
std::string title_; // title of document being rendered std::string title_; // title of document being rendered
int imagenum_; // index of last image added 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. bool happy_; // I get grumpy when the disk fills up, etc.
}; };
......
...@@ -31,11 +31,11 @@ namespace tesseract { ...@@ -31,11 +31,11 @@ namespace tesseract {
* Base Renderer interface implementation * Base Renderer interface implementation
**********************************************************************/ **********************************************************************/
TessResultRenderer::TessResultRenderer(const char *outputbase, const char *extension) TessResultRenderer::TessResultRenderer(const char *outputbase, const char *extension)
: file_extension_(extension) : next_(nullptr)
, fout_(stdout)
, file_extension_(extension)
, title_("") , title_("")
, imagenum_(-1) , imagenum_(-1)
, fout_(stdout)
, next_(nullptr)
, happy_(true) { , happy_(true) {
if (strcmp(outputbase, "-") && strcmp(outputbase, "stdout")) { if (strcmp(outputbase, "-") && strcmp(outputbase, "stdout")) {
std::string outfile = std::string(outputbase) + "." + extension; std::string outfile = std::string(outputbase) + "." + extension;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册