Skip to content

Commit

Permalink
Merge pull request #523 from stweil/casts
Browse files Browse the repository at this point in the history
opencl: Remove unneeded and potentially bad type casts
  • Loading branch information
zdenop authored Dec 2, 2016
2 parents e4faf95 + a389b7c commit 4ac54a2
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 99 deletions.
2 changes: 1 addition & 1 deletion ccmain/thresholder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void ImageThresholder::OtsuThresholdRectToPix(Pix* src_pix,
OpenclDevice od;
if ((num_channels == 4 || num_channels == 1) &&
od.selectedDeviceIsOpenCL() && rect_top_ == 0 && rect_left_ == 0 ) {
od.ThresholdRectToPixOCL((const unsigned char*)pixGetData(src_pix),
od.ThresholdRectToPixOCL((unsigned char*)pixGetData(src_pix),
num_channels, pixGetWpl(src_pix) * 4,
thresholds, hi_values, out_pix /*pix_OCL*/,
rect_height_, rect_width_, rect_top_, rect_left_);
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/otsuthr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int OtsuThreshold(Pix* src_pix, int left, int top, int width, int height,
OpenclDevice od;
if (od.selectedDeviceIsOpenCL() && (num_channels == 1 || num_channels == 4) &&
top == 0 && left == 0) {
od.HistogramRectOCL((const unsigned char*)pixGetData(src_pix), num_channels,
od.HistogramRectOCL((unsigned char*)pixGetData(src_pix), num_channels,
pixGetWpl(src_pix) * 4, left, top, width, height,
kHistogramSize, histogramAllChannels);

Expand Down
Loading

0 comments on commit 4ac54a2

Please sign in to comment.