MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / operator<

Method operator<

source/core/StarStaticVector.hpp:384–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382
383template <typename Element, size_t MaxSize>
384bool StaticVector<Element, MaxSize>::operator<(StaticVector const& other) const {
385 for (size_t i = 0; i < m_size; ++i) {
386 if (i >= other.size())
387 return false;
388
389 Element const& a = operator[](i);
390 Element const& b = other[i];
391
392 if (a < b)
393 return true;
394 else if (b < a)
395 return false;
396 }
397
398 return m_size < other.size();
399}
400
401}

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected