Remove an integer cast.
This commit is contained in:
parent
93184c54ac
commit
38f42871c7
@ -700,11 +700,11 @@ bool SPolygon::ContainsPoint(Vector p) const {
|
||||
return (WindingNumberForPoint(p) % 2) == 1;
|
||||
}
|
||||
|
||||
int SPolygon::WindingNumberForPoint(Vector p) const {
|
||||
size_t SPolygon::WindingNumberForPoint(Vector p) const {
|
||||
auto winding = std::count_if(l.begin(), l.end(), [&](const SContour &sc) {
|
||||
return sc.ContainsPointProjdToNormal(normal, p);
|
||||
});
|
||||
return static_cast<int>(winding);
|
||||
return winding;
|
||||
}
|
||||
|
||||
void SPolygon::FixContourDirections() {
|
||||
|
@ -149,7 +149,7 @@ public:
|
||||
|
||||
Vector ComputeNormal() const;
|
||||
void AddEmptyContour();
|
||||
int WindingNumberForPoint(Vector p) const;
|
||||
size_t WindingNumberForPoint(Vector p) const;
|
||||
double SignedArea() const;
|
||||
bool ContainsPoint(Vector p) const;
|
||||
void MakeEdgesInto(SEdgeList *el) const;
|
||||
|
Loading…
Reference in New Issue
Block a user