Skip to content

Commit a389b7c

Browse files
committed
opencl: Remove unneeded and potentially bad type casts
Signed-off-by: Stefan Weil <[email protected]>
1 parent e4faf95 commit a389b7c

File tree

4 files changed

+99
-99
lines changed

4 files changed

+99
-99
lines changed

ccmain/thresholder.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ void ImageThresholder::OtsuThresholdRectToPix(Pix* src_pix,
265265
OpenclDevice od;
266266
if ((num_channels == 4 || num_channels == 1) &&
267267
od.selectedDeviceIsOpenCL() && rect_top_ == 0 && rect_left_ == 0 ) {
268-
od.ThresholdRectToPixOCL((const unsigned char*)pixGetData(src_pix),
268+
od.ThresholdRectToPixOCL((unsigned char*)pixGetData(src_pix),
269269
num_channels, pixGetWpl(src_pix) * 4,
270270
thresholds, hi_values, out_pix /*pix_OCL*/,
271271
rect_height_, rect_width_, rect_top_, rect_left_);

ccstruct/otsuthr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int OtsuThreshold(Pix* src_pix, int left, int top, int width, int height,
5858
OpenclDevice od;
5959
if (od.selectedDeviceIsOpenCL() && (num_channels == 1 || num_channels == 4) &&
6060
top == 0 && left == 0) {
61-
od.HistogramRectOCL((const unsigned char*)pixGetData(src_pix), num_channels,
61+
od.HistogramRectOCL((unsigned char*)pixGetData(src_pix), num_channels,
6262
pixGetWpl(src_pix) * 4, left, top, width, height,
6363
kHistogramSize, histogramAllChannels);
6464

0 commit comments

Comments
 (0)