Update to 14.0-beta1
This commit is contained in:
+9
-11
@@ -11,8 +11,6 @@
|
||||
#define KDTREE_HPP
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
|
||||
/**
|
||||
* K-dimensional tree, specialised for 2-dimensional space.
|
||||
@@ -55,7 +53,7 @@ class Kdtree {
|
||||
/** Create one new node in the tree, return its index in the pool */
|
||||
size_t AddNode(const T &element)
|
||||
{
|
||||
if (this->free_list.size() == 0) {
|
||||
if (this->free_list.empty()) {
|
||||
this->nodes.emplace_back(element);
|
||||
return this->nodes.size() - 1;
|
||||
} else {
|
||||
@@ -449,14 +447,14 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all items contained within the given rectangle.
|
||||
* @note Start coordinates are inclusive, end coordinates are exclusive. x1<x2 && y1<y2 is a precondition.
|
||||
* @param x1 Start first coordinate, points found are greater or equals to this.
|
||||
* @param y1 Start second coordinate, points found are greater or equals to this.
|
||||
* @param x2 End first coordinate, points found are less than this.
|
||||
* @param y2 End second coordinate, points found are less than this.
|
||||
* @param outputter Callback used to return values from the search.
|
||||
*/
|
||||
* Find all items contained within the given rectangle.
|
||||
* @note Start coordinates are inclusive, end coordinates are exclusive. x1<x2 && y1<y2 is a precondition.
|
||||
* @param x1 Start first coordinate, points found are greater or equals to this.
|
||||
* @param y1 Start second coordinate, points found are greater or equals to this.
|
||||
* @param x2 End first coordinate, points found are less than this.
|
||||
* @param y2 End second coordinate, points found are less than this.
|
||||
* @param outputter Callback used to return values from the search.
|
||||
*/
|
||||
template <typename Outputter>
|
||||
void FindContained(CoordT x1, CoordT y1, CoordT x2, CoordT y2, const Outputter &outputter) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user