Undone changes to main

This commit is contained in:
Tiberiu Chibici 2016-12-14 00:35:40 +02:00
parent 1f6f51877a
commit f8571b36bd

View File

@ -4,39 +4,6 @@
using namespace farmlands;
#include <utils/QTree.h>
void qtreeTest()
{
utils::RectF bounds(0, 0, 100, 100);
utils::QTree<std::string, 10> tree(bounds);
Assert(tree.empty(), "Tree should be empty.");
Assert(tree.size() == 0, "Tree should be empty.");
srand(10);
for (int i = 0; i < 100; i++)
{
tree.insert("Random", rand() % 100, rand() % 100);
}
Assert(!tree.empty(), "Tree should be empty.");
Assert(tree.size() == 100, "Tree should be empty.");
while (tree.size() > 2)
tree.erase(tree.begin());
utils::RectF search(-10, -10, 120, 120);
for (auto it = tree.lower_bound(search); it != tree.upper_bound(search); it++)
std::cout << it->data << ": " << it->x << ", " << it->y << "\n";
}
int main()
{
qtreeTest();
}
#if 0
int main()
{
int ret = 0;
@ -64,5 +31,3 @@ int main()
return ret;
}
#endif