Navigation Menu

Skip to content

Commit

Permalink
api/pdfrenderer.cpp: Fix compiler warning
Browse files Browse the repository at this point in the history
Compiler warning from clang:

src/api/pdfrenderer.cpp:848:28: warning:
 cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Sep 3, 2018
1 parent 08e25d4 commit 9f8ed31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/api/pdfrenderer.cpp
Expand Up @@ -696,7 +696,7 @@ bool TessPDFRenderer::BeginDocumentHandler() {
}

bool TessPDFRenderer::imageToPDFObj(Pix *pix,
char *filename,
const char* filename,
long int objnum,
char **pdf_object,
long int *pdf_object_size) {
Expand Down Expand Up @@ -845,7 +845,7 @@ bool TessPDFRenderer::AddImageHandler(TessBaseAPI* api) {
char buf[kBasicBufSize];
char buf2[kBasicBufSize];
Pix *pix = api->GetInputImage();
char *filename = (char *)api->GetInputName();
const char* filename = reinterpret_cast<const char*>(api->GetInputName());
int ppi = api->GetSourceYResolution();
if (!pix || ppi <= 0)
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/api/renderer.h
Expand Up @@ -212,8 +212,8 @@ class TESS_API TessPDFRenderer : public TessResultRenderer {
// Create the /Contents object for an entire page.
char* GetPDFTextObjects(TessBaseAPI* api, double width, double height);
// Turn an image into a PDF object. Only transcode if we have to.
static bool imageToPDFObj(Pix *pix, char *filename, long int objnum,
char **pdf_object, long int *pdf_object_size);
static bool imageToPDFObj(Pix* pix, const char* filename, long int objnum,
char** pdf_object, long int* pdf_object_size);
};


Expand Down

0 comments on commit 9f8ed31

Please sign in to comment.