Merge pull request #448 from assimp/revert-447-master

Revert "Fix warnings under Visual Studio 12"
pull/449/head
Alexander Gessler 2015-01-26 19:54:18 +01:00
commit a482bc59f4
2 changed files with 6 additions and 6 deletions

View File

@ -96,11 +96,11 @@ void SweepContext::InitTriangulation()
void SweepContext::InitEdges(std::vector<Point*> polyline) void SweepContext::InitEdges(std::vector<Point*> polyline)
{ {
std::size_t num_points = polyline.size(); int num_points = polyline.size();
for (std::size_t i = 0; i < num_points - 1; i++) { for (int i = 0; i < num_points; i++) {
edge_list.push_back(new Edge(*polyline[i], *polyline[i + 1])); int j = i < num_points - 1 ? i + 1 : 0;
edge_list.push_back(new Edge(*polyline[i], *polyline[j]));
} }
edge_list.push_back(new Edge(*polyline.back(), *polyline.front()));
} }
Point* SweepContext::GetPoint(const int& index) Point* SweepContext::GetPoint(const int& index)

View File

@ -64,7 +64,7 @@ void set_tail(Point* p1);
Point* tail(); Point* tail();
std::size_t point_count(); int point_count();
Node& LocateNode(Point& point); Node& LocateNode(Point& point);
@ -156,7 +156,7 @@ inline AdvancingFront* SweepContext::front()
return front_; return front_;
} }
inline std::size_t SweepContext::point_count() inline int SweepContext::point_count()
{ {
return points_.size(); return points_.size();
} }