Commit 43d085d7 authored by Cédric Traizet's avatar Cédric Traizet

ENH: replaced int by unsigned int for the internal radius type

parent 0dcf5924
......@@ -139,15 +139,15 @@ public:
private:
// Internal radius along the X axis
int m_InternalRadiusX;
unsigned int m_InternalRadiusX;
// Internal radius along the Y axis
int m_InternalRadiusY;
unsigned int m_InternalRadiusY;
public:
LocalRxDetectionFunctor() : m_InternalRadiusX(1), m_InternalRadiusY(1) {};
void SetInternalRadius(const int internalRadiusX, const int internalRadiusY)
void SetInternalRadius(const unsigned int internalRadiusX, const unsigned int internalRadiusY)
{
m_InternalRadiusX = internalRadiusX;
m_InternalRadiusY = internalRadiusY;
......@@ -180,10 +180,10 @@ public:
const int internalRadiusY = m_InternalRadiusY;
auto externalRadius = in.GetRadius();
for (int y = -static_cast<int>(externalRadius[1]); y <= static_cast<int>(externalRadius[1]); y++)
for (int y = -externalRadius[1]; y <= static_cast<int>(externalRadius[1]); y++)
{
off[1] = y;
for (int x = -static_cast<int>(externalRadius[0]); x <= static_cast<int>(externalRadius[0]); x++)
for (int x = -externalRadius[0]; x <= static_cast<int>(externalRadius[0]); x++)
{
off[0] = x;
if ((abs(x) > internalRadiusX) || (abs(y) > internalRadiusY))
......
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