@@ -1514,9 +1514,9 @@ namespace OrthoTree
1514
1514
1515
1515
static inline bool IsValidKey (NonLinearMortonGridID const & key) noexcept { return key.any (); }
1516
1516
1517
- static depth_t GetDepthID (MortonNodeID key) noexcept
1517
+ static constexpr depth_t GetDepthID (MortonNodeID key) noexcept
1518
1518
{
1519
- // Keep shifting off three bits at a time, increasing depth counter
1519
+ // Keep shifting off DIMENSION_NO bits at a time, increasing depth counter
1520
1520
for (depth_t d = 0 ; IsValidKey (key); ++d, key >>= DIMENSION_NO)
1521
1521
if (key == 1 ) // If only sentinel bit remains, exit with node depth
1522
1522
return d;
@@ -1640,12 +1640,12 @@ namespace OrthoTree
1640
1640
1641
1641
1642
1642
public: // Getters
1643
- inline auto const & GetNodes () const noexcept { return m_nodes; }
1643
+ constexpr auto const & GetNodes () const noexcept { return m_nodes; }
1644
1644
inline bool HasNode (MortonNodeIDCR key) const noexcept { return m_nodes.contains (key); }
1645
1645
inline auto const & GetNode (MortonNodeIDCR key) const noexcept { return m_nodes.at (key); }
1646
- inline auto const & GetBox () const noexcept { return m_boxSpace; }
1647
- inline auto GetDepthMax () const noexcept { return m_maxDepthNo; }
1648
- inline auto GetResolutionMax () const noexcept { return m_maxRasterResolution; }
1646
+ constexpr auto const & GetBox () const noexcept { return m_boxSpace; }
1647
+ constexpr auto GetDepthMax () const noexcept { return m_maxDepthNo; }
1648
+ constexpr auto GetResolutionMax () const noexcept { return m_maxRasterResolution; }
1649
1649
inline auto GetNodeIDByEntity (TEntityID entityID) const noexcept
1650
1650
{
1651
1651
autoc it = std::ranges::find_if (m_nodes, [&](autoc& keyAndValue) {
@@ -1725,7 +1725,7 @@ namespace OrthoTree
1725
1725
{
1726
1726
struct Search
1727
1727
{
1728
- MortonNodeID Key;
1728
+ MortonNodeIDCR Key;
1729
1729
bool DoAvoidSelectionParent;
1730
1730
};
1731
1731
@@ -1741,7 +1741,7 @@ namespace OrthoTree
1741
1741
autoc doAvoidSelection = doAvoidSelectionParent || selectorUnconditional (key, node);
1742
1742
procedure (key, node, doAvoidSelection);
1743
1743
1744
- for (MortonNodeID childKey : node.GetChildren ())
1744
+ for (MortonNodeIDCR childKey : node.GetChildren ())
1745
1745
nodesToProceed.push ({ childKey, doAvoidSelection });
1746
1746
}
1747
1747
}
@@ -1755,7 +1755,7 @@ namespace OrthoTree
1755
1755
return ;
1756
1756
1757
1757
procedure (key, node);
1758
- for (autoc childKey : node.GetChildren ())
1758
+ for (MortonNodeIDCR childKey : node.GetChildren ())
1759
1759
VisitNodesInDFS (childKey, procedure, selector);
1760
1760
}
1761
1761
0 commit comments