@@ -94,7 +94,7 @@ inT16 length //length of loop
94
94
pos = startpt;
95
95
stepcount = length; // No. of steps.
96
96
ASSERT_HOST (length >= 0 );
97
- steps = reinterpret_cast <uinT8*>(alloc_mem (step_mem ())); // Get memory.
97
+ steps = static_cast <uinT8*>(alloc_mem (step_mem ())); // Get memory.
98
98
memset (steps, 0 , step_mem ());
99
99
100
100
lastdir = new_steps[length - 1 ];
@@ -655,23 +655,23 @@ static void ComputeGradient(const l_uint32* data, int wpl,
655
655
int pix_x_y =
656
656
x < width && y < height
657
657
? GET_DATA_BYTE (
658
- const_cast <void *>(reinterpret_cast <const void *>(line)), x)
658
+ const_cast <void *>(static_cast <const void *>(line)), x)
659
659
: 255 ;
660
660
int pix_x_prevy =
661
661
x < width && y > 0
662
662
? GET_DATA_BYTE (
663
- const_cast <void *>(reinterpret_cast <const void *>(line - wpl)), x)
663
+ const_cast <void *>(static_cast <const void *>(line - wpl)), x)
664
664
: 255 ;
665
665
int pix_prevx_prevy =
666
666
x > 0 && y > 0
667
667
? GET_DATA_BYTE (
668
- const_cast <void *>(reinterpret_cast <void const *>(line - wpl)),
668
+ const_cast <void *>(static_cast <void const *>(line - wpl)),
669
669
x - 1 )
670
670
: 255 ;
671
671
int pix_prevx_y =
672
672
x > 0 && y < height
673
673
? GET_DATA_BYTE (
674
- const_cast <void *>(reinterpret_cast <const void *>(line)), x - 1 )
674
+ const_cast <void *>(static_cast <const void *>(line)), x - 1 )
675
675
: 255 ;
676
676
gradient->set_x (pix_x_y + pix_x_prevy - (pix_prevx_y + pix_prevx_prevy));
677
677
gradient->set_y (pix_x_prevy + pix_prevx_prevy - (pix_x_y + pix_prevx_y));
@@ -689,9 +689,9 @@ static bool EvaluateVerticalDiff(const l_uint32* data, int wpl, int diff_sign,
689
689
return false ;
690
690
const l_uint32* line = data + y * wpl;
691
691
int pixel1 = GET_DATA_BYTE (
692
- const_cast <void *>(reinterpret_cast <const void *>(line - wpl)), x);
692
+ const_cast <void *>(static_cast <const void *>(line - wpl)), x);
693
693
int pixel2 =
694
- GET_DATA_BYTE (const_cast <void *>(reinterpret_cast <const void *>(line)), x);
694
+ GET_DATA_BYTE (const_cast <void *>(static_cast <const void *>(line)), x);
695
695
int diff = (pixel2 - pixel1) * diff_sign;
696
696
if (diff > *best_diff) {
697
697
*best_diff = diff;
@@ -712,9 +712,9 @@ static bool EvaluateHorizontalDiff(const l_uint32* line, int diff_sign,
712
712
if (x <= 0 || x >= width)
713
713
return false ;
714
714
int pixel1 = GET_DATA_BYTE (
715
- const_cast <void *>(reinterpret_cast <const void *>(line)), x - 1 );
715
+ const_cast <void *>(static_cast <const void *>(line)), x - 1 );
716
716
int pixel2 =
717
- GET_DATA_BYTE (const_cast <void *>(reinterpret_cast <const void *>(line)), x);
717
+ GET_DATA_BYTE (const_cast <void *>(static_cast <const void *>(line)), x);
718
718
int diff = (pixel2 - pixel1) * diff_sign;
719
719
if (diff > *best_diff) {
720
720
*best_diff = diff;
0 commit comments