Skip to content

Commit

Permalink
GCC compile fix
Browse files Browse the repository at this point in the history
  • Loading branch information
attcs committed Mar 8, 2024
1 parent e7040b7 commit 4d663c8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
4 changes: 3 additions & 1 deletion gcc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10)

project(octree)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
find_package(TBB REQUIRED COMPONENTS tbb)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTBB_ENABLE_IPO=off -std=c++20")
include_directories(../)
add_executable(octree main.cpp)
target_link_libraries(octree tbb)
26 changes: 13 additions & 13 deletions octree.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ namespace OrthoTree
struct BoxDistance : ItemDistance
{
MortonNodeID NodeKey;
Node const& Node;
Node const& NodeReference;
};

template<typename T>
Expand Down Expand Up @@ -1836,11 +1836,11 @@ namespace OrthoTree

using Node = typename Base::Node;

using TGeometry = typename TGeometry_;
using TVector = typename TVector_;
using TBox = typename TBox_;
using TRay = typename TRay_;
using TPlane = typename TPlane_;
using TGeometry = TGeometry_;
using TVector = TVector_;
using TBox = TBox_;
using TRay = TRay_;
using TPlane = TPlane_;

static constexpr std::size_t DEFAULT_MAX_ELEMENT = 21;

Expand Down Expand Up @@ -2182,7 +2182,7 @@ namespace OrthoTree
if (neighborNo <= n && rLatestNodeDist < nodeDist.Distance)
break;

createEntityDistance(nodeDist.Node, searchPoint, points, neighborEntities);
createEntityDistance(nodeDist.NodeReference, searchPoint, points, neighborEntities);
rLatestNodeDist = getFarestDistance(neighborEntities, neighborNo);
}
}
Expand Down Expand Up @@ -2223,11 +2223,11 @@ namespace OrthoTree

using Node = typename Base::Node;

using TGeometry = typename TGeometry_;
using TVector = typename TVector_;
using TBox = typename TBox_;
using TRay = typename TRay_;
using TPlane = typename TPlane_;
using TGeometry = TGeometry_;
using TVector = TVector_;
using TBox = TBox_;
using TRay = TRay_;
using TPlane = TPlane_;

static constexpr std::size_t DEFAULT_MAX_ELEMENT = 21;

Expand Down Expand Up @@ -3249,7 +3249,7 @@ namespace OrthoTree
}

for (autoc& nodeDistance : nodeDistances)
getRayIntersectedFirst(nodeDistance.Node, boxes, rayBasePoint, rayHeading, tolerance, foundEntities);
getRayIntersectedFirst(nodeDistance.NodeReference, boxes, rayBasePoint, rayHeading, tolerance, foundEntities);
}


Expand Down

0 comments on commit 4d663c8

Please sign in to comment.