Commit 5c1aff90 authored by Quentin Khan's avatar Quentin Khan

Remove remaining deprecated warnings after FTreeCoordinate simplification

parent e9c6352e
...@@ -53,7 +53,7 @@ class FCoordinateNeighborIndex : public FAbstractNeighborIndex{ ...@@ -53,7 +53,7 @@ class FCoordinateNeighborIndex : public FAbstractNeighborIndex{
public: public:
FCoordinateNeighborIndex(const MortonIndex inMindex, const int inLevel) FCoordinateNeighborIndex(const MortonIndex inMindex, const int inLevel)
: mindex(inMindex), level(inLevel), coord(mindex, level) { : mindex(inMindex), level(inLevel), coord(mindex) {
currentMinX = (coord.getX()==0? 0 : -1); currentMinX = (coord.getX()==0? 0 : -1);
currentMinY = (coord.getY()==0? 0 : -1); currentMinY = (coord.getY()==0? 0 : -1);
...@@ -233,4 +233,3 @@ public: ...@@ -233,4 +233,3 @@ public:
}; };
#endif // FNEIGHBORINDEXES_HPP #endif // FNEIGHBORINDEXES_HPP
...@@ -274,7 +274,7 @@ int main(int argc, char ** argv){ ...@@ -274,7 +274,7 @@ int main(int argc, char ** argv){
}while(sscanf(buffer,"%lld",&index) != 1); }while(sscanf(buffer,"%lld",&index) != 1);
FTreeCoordinate coord; FTreeCoordinate coord;
coord.setPositionFromMorton(index,requiredlevel); coord.setPositionFromMorton(index);
std::cout << " This position is in the boxe x = "<< coord.getX() << " y = " << coord.getY() << " z = " << coord.getZ() << "\n"; std::cout << " This position is in the boxe x = "<< coord.getX() << " y = " << coord.getY() << " z = " << coord.getZ() << "\n";
...@@ -293,6 +293,3 @@ int main(int argc, char ** argv){ ...@@ -293,6 +293,3 @@ int main(int argc, char ** argv){
return 0; return 0;
} }
...@@ -30,21 +30,21 @@ class TestMorton : public FUTester<TestMorton> { ...@@ -30,21 +30,21 @@ class TestMorton : public FUTester<TestMorton> {
{ {
FTreeCoordinate pos(5,1,7); FTreeCoordinate pos(5,1,7);
FTreeCoordinate cp; FTreeCoordinate cp;
cp.setPositionFromMorton(pos.getMortonIndex(),10); cp.setPositionFromMorton(pos.getMortonIndex());
uassert(pos == cp); uassert(pos == cp);
uassert(cp.getMortonIndex() == pos.getMortonIndex()); uassert(cp.getMortonIndex() == pos.getMortonIndex());
} }
{ {
FTreeCoordinate pos(2,8,3); FTreeCoordinate pos(2,8,3);
FTreeCoordinate cp; FTreeCoordinate cp;
cp.setPositionFromMorton(pos.getMortonIndex(),10); cp.setPositionFromMorton(pos.getMortonIndex());
uassert(pos == cp); uassert(pos == cp);
uassert(cp.getMortonIndex() == pos.getMortonIndex()); uassert(cp.getMortonIndex() == pos.getMortonIndex());
} }
{ {
FTreeCoordinate pos(51,11,47); FTreeCoordinate pos(51,11,47);
FTreeCoordinate cp; FTreeCoordinate cp;
cp.setPositionFromMorton(pos.getMortonIndex(),10); cp.setPositionFromMorton(pos.getMortonIndex());
uassert(pos == cp); uassert(pos == cp);
uassert(cp.getMortonIndex() == pos.getMortonIndex()); uassert(cp.getMortonIndex() == pos.getMortonIndex());
} }
...@@ -82,5 +82,3 @@ class TestMorton : public FUTester<TestMorton> { ...@@ -82,5 +82,3 @@ class TestMorton : public FUTester<TestMorton> {
// You must do this // You must do this
TestClass(TestMorton) TestClass(TestMorton)
...@@ -55,7 +55,7 @@ class TestIndexes : public FUTester<TestIndexes> { ...@@ -55,7 +55,7 @@ class TestIndexes : public FUTester<TestIndexes> {
uassert(coordindexes.getIndex(idxX, idxY, idxZ) uassert(coordindexes.getIndex(idxX, idxY, idxZ)
== bitsindex.getIndex(idxX, idxY, idxZ)); == bitsindex.getIndex(idxX, idxY, idxZ));
const MortonIndex neigh = bitsindex.getIndex(idxX, idxY, idxZ); const MortonIndex neigh = bitsindex.getIndex(idxX, idxY, idxZ);
const FTreeCoordinate neighCoord(neigh, idxLevel); const FTreeCoordinate neighCoord(neigh);
uassert(xbox + idxX == neighCoord.getX()); uassert(xbox + idxX == neighCoord.getX());
uassert(ybox + idxY == neighCoord.getY()); uassert(ybox + idxY == neighCoord.getY());
uassert(zbox + idxZ == neighCoord.getZ()); uassert(zbox + idxZ == neighCoord.getZ());
...@@ -100,7 +100,7 @@ class TestIndexes : public FUTester<TestIndexes> { ...@@ -100,7 +100,7 @@ class TestIndexes : public FUTester<TestIndexes> {
uassert(coordindexes.getIndex(idxX, idxY, idxZ) uassert(coordindexes.getIndex(idxX, idxY, idxZ)
== bitsindex.getIndex(idxX, idxY, idxZ)); == bitsindex.getIndex(idxX, idxY, idxZ));
const MortonIndex neigh = bitsindex.getIndex(idxX, idxY, idxZ); const MortonIndex neigh = bitsindex.getIndex(idxX, idxY, idxZ);
const FTreeCoordinate neighCoord(neigh, idxLevel); const FTreeCoordinate neighCoord(neigh);
uassert(xbox + idxX == neighCoord.getX()); uassert(xbox + idxX == neighCoord.getX());
uassert(ybox + idxY == neighCoord.getY()); uassert(ybox + idxY == neighCoord.getY());
uassert(zbox + idxZ == neighCoord.getZ()); uassert(zbox + idxZ == neighCoord.getZ());
...@@ -145,7 +145,7 @@ class TestIndexes : public FUTester<TestIndexes> { ...@@ -145,7 +145,7 @@ class TestIndexes : public FUTester<TestIndexes> {
uassert(coordindexes.getIndex(idxX, idxY, idxZ) uassert(coordindexes.getIndex(idxX, idxY, idxZ)
== bitsindex.getIndex(idxX, idxY, idxZ)); == bitsindex.getIndex(idxX, idxY, idxZ));
const MortonIndex neigh = bitsindex.getIndex(idxX, idxY, idxZ); const MortonIndex neigh = bitsindex.getIndex(idxX, idxY, idxZ);
const FTreeCoordinate neighCoord(neigh, idxLevel); const FTreeCoordinate neighCoord(neigh);
uassert(xbox + idxX == neighCoord.getX()); uassert(xbox + idxX == neighCoord.getX());
uassert(ybox + idxY == neighCoord.getY()); uassert(ybox + idxY == neighCoord.getY());
uassert(zbox + idxZ == neighCoord.getZ()); uassert(zbox + idxZ == neighCoord.getZ());
...@@ -167,12 +167,12 @@ class TestIndexes : public FUTester<TestIndexes> { ...@@ -167,12 +167,12 @@ class TestIndexes : public FUTester<TestIndexes> {
const MortonIndex limit = FMath::pow2(idxLevel)*3L; const MortonIndex limit = FMath::pow2(idxLevel)*3L;
for(MortonIndex idxV1 = 1 ; idxV1 < limit ; ++idxV1){ for(MortonIndex idxV1 = 1 ; idxV1 < limit ; ++idxV1){
FBitsNeighborIndex bitsindex(idxV1, idxLevel); FBitsNeighborIndex bitsindex(idxV1, idxLevel);
const FTreeCoordinate coord1(idxV1, idxLevel); const FTreeCoordinate coord1(idxV1);
for(MortonIndex idxV2 = 0 ; idxV2 < limit ; ++idxV2){ for(MortonIndex idxV2 = 0 ; idxV2 < limit ; ++idxV2){
const bool isneig = bitsindex.areNeighbors(idxV1, idxV2); const bool isneig = bitsindex.areNeighbors(idxV1, idxV2);
const FTreeCoordinate coord2(idxV2, idxLevel); const FTreeCoordinate coord2(idxV2);
const bool isreallyneig = (FMath::Abs(coord1.getX()-coord2.getX()) <= 1) const bool isreallyneig = (FMath::Abs(coord1.getX()-coord2.getX()) <= 1)
&& (FMath::Abs(coord1.getY()-coord2.getY()) <= 1) && (FMath::Abs(coord1.getY()-coord2.getY()) <= 1)
&& (FMath::Abs(coord1.getZ()-coord2.getZ()) <= 1); && (FMath::Abs(coord1.getZ()-coord2.getZ()) <= 1);
...@@ -195,6 +195,3 @@ class TestIndexes : public FUTester<TestIndexes> { ...@@ -195,6 +195,3 @@ class TestIndexes : public FUTester<TestIndexes> {
// You must do this // You must do this
TestClass(TestIndexes) TestClass(TestIndexes)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment