Skip to content

Commit

Permalink
Don't specify template params for make_pair
Browse files Browse the repository at this point in the history
  • Loading branch information
mintar committed Jun 2, 2017
1 parent ab4041b commit ba0380c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/datatypes/Box2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Box2D::getBoundingAngles() const
if (containsPoint(Point2D(0, 0)))
{
// Origin is inside. Then return the full interval.
return std::make_pair<value_type, value_type>(-PI, PI);
return std::make_pair(-PI, PI);
}

// The usual case: The box does not contain the origin. Then we
Expand All @@ -167,7 +167,7 @@ Box2D::getBoundingAngles() const
maxangle = pointangle;
}

return std::make_pair<value_type, value_type>(minangle, maxangle);
return std::make_pair(minangle, maxangle);
}

bool Box2D::containsPoint(const Point2D& point) const
Expand Down
6 changes: 3 additions & 3 deletions src/datatypes/Polygon2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ Box2D Polygon2D::getBoundingBox() const
std::pair<Polygon2D::floatingpoint_type, Polygon2D::floatingpoint_type> Polygon2D::getBoundingAngles() const
{
if (empty())
return std::make_pair<floatingpoint_type, floatingpoint_type>(0, 0);
return std::make_pair(0, 0);

// Need to check whether the origin is inside the polygon. BUT: If
// the origin is directly on the boundary, containsPoint() may or
Expand All @@ -316,7 +316,7 @@ std::pair<Polygon2D::floatingpoint_type, Polygon2D::floatingpoint_type> Polygon2
if (containsPoint(Point2D(0, 0)))
{
// Origin is inside. Then return the full interval.
return std::make_pair<floatingpoint_type, floatingpoint_type>(-PI, PI);
return std::make_pair(-PI, PI);
}

// The usual case: The polygon does not contain the origin. Then we
Expand Down Expand Up @@ -365,7 +365,7 @@ std::pair<Polygon2D::floatingpoint_type, Polygon2D::floatingpoint_type> Polygon2
}
}

return std::make_pair<floatingpoint_type, floatingpoint_type>(minangle, maxangle);
return std::make_pair(minangle, maxangle);
}

/**
Expand Down

0 comments on commit ba0380c

Please sign in to comment.