Skip to content

Commit

Permalink
Removing unnecessary check for negative values
Browse files Browse the repository at this point in the history
  • Loading branch information
whart222 committed Aug 4, 2024
1 parent 58ff54d commit 9af8fd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/coek/coek/api/indexed_container.defs.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <type_traits>

namespace coek {

template <class TYPE>
Expand Down Expand Up @@ -37,7 +39,7 @@ class IndexedComponentRepn_multiarray : public IndexedComponentRepn<TYPE> {
{
for (size_t i = 0; i < this->_dim; ++i) {
size_t tmp = static_cast<size_t>(args[i]);
if ((tmp < 0) or (tmp >= shape[i]))
if (tmp >= shape[i])
return false;
}
return true;
Expand Down

0 comments on commit 9af8fd2

Please sign in to comment.