Commit cb2aac60 authored by Davis King's avatar Davis King

Removed an unneeded cast.

parent 92157160
...@@ -242,28 +242,28 @@ namespace dlib ...@@ -242,28 +242,28 @@ namespace dlib
if (abs(horz[r-1][c])+abs(vert[r-1][c]) > val || abs(horz[r+1][c]) + abs(vert[r+1][c]) > val) if (abs(horz[r-1][c])+abs(vert[r-1][c]) > val || abs(horz[r+1][c]) + abs(vert[r+1][c]) > val)
assign_pixel(out_img[r][c] , zero); assign_pixel(out_img[r][c] , zero);
else else
assign_pixel(out_img[r][c] , static_cast<unsigned long>(val)); assign_pixel(out_img[r][c] , val);
break; break;
case '|': case '|':
if (abs(horz[r][c-1]) + abs(vert[r][c-1]) > val || abs(horz[r][c+1]) + abs(vert[r][c+1]) > val) if (abs(horz[r][c-1]) + abs(vert[r][c-1]) > val || abs(horz[r][c+1]) + abs(vert[r][c+1]) > val)
assign_pixel(out_img[r][c] , zero); assign_pixel(out_img[r][c] , zero);
else else
assign_pixel(out_img[r][c] , static_cast<unsigned long>(val)); assign_pixel(out_img[r][c] , val);
break; break;
case '/': case '/':
if (abs(horz[r-1][c-1]) + abs(vert[r-1][c-1]) > val || abs(horz[r+1][c+1]) + abs(vert[r+1][c+1]) > val) if (abs(horz[r-1][c-1]) + abs(vert[r-1][c-1]) > val || abs(horz[r+1][c+1]) + abs(vert[r+1][c+1]) > val)
assign_pixel(out_img[r][c] , zero); assign_pixel(out_img[r][c] , zero);
else else
assign_pixel(out_img[r][c] , static_cast<unsigned long>(val)); assign_pixel(out_img[r][c] , val);
break; break;
case '\\': case '\\':
if (abs(horz[r+1][c-1]) + abs(vert[r+1][c-1]) > val || abs(horz[r-1][c+1]) + abs(vert[r-1][c+1]) > val) if (abs(horz[r+1][c-1]) + abs(vert[r+1][c-1]) > val || abs(horz[r-1][c+1]) + abs(vert[r-1][c+1]) > val)
assign_pixel(out_img[r][c] , zero); assign_pixel(out_img[r][c] , zero);
else else
assign_pixel(out_img[r][c] , static_cast<unsigned long>(val)); assign_pixel(out_img[r][c] , val);
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment