started removing KLib related code:
- assertions - distributions new helper methods worked on stairs worked on grid-walkers worked on navigation
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include "GridPoint.h"
|
||||
#include "GridNode.h"
|
||||
|
||||
#include <KLib/Assertions.h>
|
||||
#include "../Assertions.h"
|
||||
#include "../geo/BBox3.h"
|
||||
#include "../misc/Debug.h"
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
void connectUniDir(T& n1, const T& n2) {
|
||||
n1._neighbors[n1._numNeighbors] = n2._idx;
|
||||
++n1._numNeighbors;
|
||||
_assertBetween(n1._numNeighbors, 0, 10, "number of neighbors out of bounds!");
|
||||
Assert::isBetween(n1._numNeighbors, 0, 10, "number of neighbors out of bounds!");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -188,13 +188,13 @@ public:
|
||||
|
||||
/** array access */
|
||||
T& operator [] (const int idx) {
|
||||
_assertBetween(idx, 0, getNumNodes()-1, "index out of bounds");
|
||||
Assert::isBetween(idx, 0, getNumNodes()-1, "index out of bounds");
|
||||
return nodes[idx];
|
||||
}
|
||||
|
||||
/** const array access */
|
||||
const T& operator [] (const int idx) const {
|
||||
_assertBetween(idx, 0, getNumNodes()-1, "index out of bounds");
|
||||
Assert::isBetween(idx, 0, getNumNodes()-1, "index out of bounds");
|
||||
return nodes[idx];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user