Skip to content

Commit d364750

Browse files
committed
Remove type cast and fix compiler warning (-Wcast-qual)
Signed-off-by: Stefan Weil <[email protected]>
1 parent 1b2bda6 commit d364750

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/pdfrenderer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ static void ClipBaseline(int ppi, int x1, int y1, int x2, int y2,
305305
*line_y1 = *line_y2 = (y1 + y2) / 2;
306306
}
307307

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

0 commit comments

Comments
 (0)