Skip to content

Commit

Permalink
Remove type cast and fix compiler warning (-Wcast-qual)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Oct 20, 2018
1 parent 1b2bda6 commit d364750
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/pdfrenderer.cpp
Expand Up @@ -305,7 +305,7 @@ static void ClipBaseline(int ppi, int x1, int y1, int x2, int y2,
*line_y1 = *line_y2 = (y1 + y2) / 2;
}

bool CodepointToUtf16be(int code, char utf16[kMaxBytesPerCodepoint]) {
static bool CodepointToUtf16be(int code, char utf16[kMaxBytesPerCodepoint]) {
if ((code > 0xD7FF && code < 0xE000) || code > 0x10FFFF) {
tprintf("Dropping invalid codepoint %d\n", code);
return false;
Expand Down Expand Up @@ -841,7 +841,7 @@ bool TessPDFRenderer::AddImageHandler(TessBaseAPI* api) {
char buf[kBasicBufSize];
char buf2[kBasicBufSize];
Pix *pix = api->GetInputImage();
const char* filename = reinterpret_cast<const char*>(api->GetInputName());
const char* filename = api->GetInputName();
int ppi = api->GetSourceYResolution();
if (!pix || ppi <= 0)
return false;
Expand Down

0 comments on commit d364750

Please sign in to comment.