Fix broken DP
This commit is contained in:
		
							parent
							
								
									3fe2b587cb
								
							
						
					
					
						commit
						27caab69ec
					
				| @ -151,7 +151,7 @@ void DouglasPeucker::Run(RandomAccessIt begin, RandomAccessIt end, const unsigne | ||||
|         const GeometryRange pair = recursion_stack.top(); | ||||
|         recursion_stack.pop(); | ||||
|         // sanity checks
 | ||||
|         BOOST_ASSERT_MSG(pair.first->necessary, "left border mus be necessary"); | ||||
|         BOOST_ASSERT_MSG(pair.first->necessary, "left border must be necessary"); | ||||
|         BOOST_ASSERT_MSG(pair.second->necessary, "right border must be necessary"); | ||||
|         BOOST_ASSERT_MSG(std::distance(pair.second, end) > 0, "right border outside of geometry"); | ||||
|         BOOST_ASSERT_MSG(std::distance(pair.first, pair.second) >= 0, "left border on the wrong side"); | ||||
| @ -181,7 +181,7 @@ void DouglasPeucker::Run(RandomAccessIt begin, RandomAccessIt end, const unsigne | ||||
|             { | ||||
|                 recursion_stack.emplace(pair.first, farthest_entry_it); | ||||
|             } | ||||
|             if (1 < std::distance(pair.second, farthest_entry_it)) | ||||
|             if (1 < std::distance(farthest_entry_it, pair.second)) | ||||
|             { | ||||
|                 recursion_stack.emplace(farthest_entry_it, pair.second); | ||||
|             } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user