Skip to content

Commit

Permalink
REMOVE unused field in areas.h/cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan committed Sep 4, 2024
1 parent 97fc17c commit f37e150
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 40 deletions.
2 changes: 0 additions & 2 deletions src/lib/ngsi/Scope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ int Scope::fill
return -1;
}

polygon.invertedSet(geometry.external);

for (unsigned int ix = 0; ix < pointV.size(); ++ix)
{
polygon.vertexAdd(pointV[ix]);
Expand Down
33 changes: 1 addition & 32 deletions src/lib/orionTypes/areas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,6 @@ void Box::fill(Point* lowerLeftP, Point* upperRightP)



/* ****************************************************************************
*
* Polygon::invertedSet -
*/
void Polygon::invertedSet(bool inverted)
{
_inverted = (inverted == true)? "true" : "false";
}



/* ****************************************************************************
*
* Polygon::vertexAdd -
Expand Down Expand Up @@ -337,7 +326,7 @@ int Georel::parse(const char* in, std::string* errorString)
*
* Geometry::Geometry -
*/
Geometry::Geometry(): areaType(""), radius(-1), external(false)
Geometry::Geometry(): areaType("")
{
}

Expand Down Expand Up @@ -369,33 +358,13 @@ int Geometry::parse(const char* in, std::string* errorString)

areaType = items[ix];
}
else if (strncmp(items[ix].c_str(), "radius", 6) == 0)
{
radius = atoi((char*) &items[ix].c_str()[7]);

if (radius == 0)
{
*errorString = "Invalid value of /radius/";
return -1;
}
}
else if (items[ix] == "external")
{
external = true;
}
else
{
*errorString = "Invalid selector in geometry specification";
return -1;
}
}

if ((areaType == "polygon") && (radius != -1))
{
*errorString = "radius set for polygon";
return -1;
}

return 0;
}

Expand Down
6 changes: 0 additions & 6 deletions src/lib/orionTypes/areas.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,8 @@ class Box
*/
class Polygon
{
private:
::std::string _inverted;

public:
::std::vector<Point*> vertexList;
void invertedSet(bool inverted);
void vertexAdd(Point* p);
void release(void);
};
Expand Down Expand Up @@ -154,8 +150,6 @@ class Geometry
int parse(const char* in, std::string* errorString);

std::string areaType;
float radius;
bool external;
};

}
Expand Down

0 comments on commit f37e150

Please sign in to comment.