Fixed checks for less than 0 on List indexing, as it was always false.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
675407d7f5
commit
fedb27790e
|
@ -36,7 +36,7 @@ namespace ArbUt {
|
|||
|
||||
inline const const_reference& At(size_t index) const {
|
||||
#ifndef NO_ASSERT
|
||||
if (index >= _vector.size() || index < 0) {
|
||||
if (index >= _vector.size()) {
|
||||
std::stringstream ss;
|
||||
ss << "Index " << index << " is out of bounds.";
|
||||
throw ArbUt::Exception(ss.str());
|
||||
|
@ -47,7 +47,7 @@ namespace ArbUt {
|
|||
|
||||
inline const const_reference& Set(size_t index, const ValueT& value) {
|
||||
#ifndef NO_ASSERT
|
||||
if (index >= _vector.size() || index < 0) {
|
||||
if (index >= _vector.size()) {
|
||||
std::stringstream ss;
|
||||
ss << "Index " << index << " is out of bounds.";
|
||||
throw ArbUt::Exception(ss.str());
|
||||
|
|
Loading…
Reference in New Issue