Skip to content

Commit

Permalink
Fix some hidden implicit conversion issues
Browse files Browse the repository at this point in the history
  • Loading branch information
attcs committed Mar 10, 2024
1 parent a1de388 commit 23bda72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions octree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ namespace OrthoTree

static constexpr MortonNodeID GetRootKey() noexcept { return MortonNodeID{ 1 }; }

static constexpr bool IsValidKey(uint64_t key) noexcept { return key; }
static constexpr bool IsValidKey(uint64_t key) noexcept { return key > 0; }

template<std::size_t N>
static inline bool IsValidKey(bitset_arithmetic<N> const& key) noexcept
Expand Down Expand Up @@ -1676,7 +1676,7 @@ namespace OrthoTree
{
foundEntities.resize(DO_COLLECT_ONLY_LARGER_THAN_MIN_ENTITY_ID ? entityNo - minEntityID - 1 : entityNo);
std::iota(foundEntities.begin(), foundEntities.end(), DO_COLLECT_ONLY_LARGER_THAN_MIN_ENTITY_ID ? minEntityID + 1 : 0);
return entityNo;
return entityNo > 0;
}

// If the range has zero volume, it could stuck at any node comparison with point/side touch. It is eliminated to work node bounding box independently.
Expand Down

0 comments on commit 23bda72

Please sign in to comment.