MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / begin

Method begin

include/reactphysics3d/containers/Map.h:664–684  ·  view source on GitHub ↗

Return a begin iterator

Source from the content-addressed store, hash-verified

662
663 /// Return a begin iterator
664 Iterator begin() const {
665
666 // If the map is empty
667 if (size() == 0) {
668
669 // Return an iterator to the end
670 return end();
671 }
672
673 // Find the first used entry
674 uint64 bucketIndex = 0;
675 while (mBuckets[bucketIndex] == INVALID_INDEX) {
676
677 bucketIndex++;
678 }
679
680 assert(bucketIndex < mHashSize);
681 assert(mBuckets[bucketIndex] != INVALID_INDEX);
682
683 return Iterator(this, bucketIndex, mBuckets[bucketIndex]);
684 }
685
686 /// Return a end iterator
687 Iterator end() const {

Callers 15

isHitMethod · 0.45
isOverlappingMethod · 0.45
testAddRemoveClearMethod · 0.45
testIteratorsMethod · 0.45
testConstructorsMethod · 0.45
testIteratorsMethod · 0.45
testAddRemoveClearMethod · 0.45
testIteratorsMethod · 0.45
testConvertersMethod · 0.45
testAddRemoveClearMethod · 0.45
testFindMethod · 0.45

Calls 1

IteratorClass · 0.70

Tested by 13

isHitMethod · 0.36
isOverlappingMethod · 0.36
testAddRemoveClearMethod · 0.36
testIteratorsMethod · 0.36
testConstructorsMethod · 0.36
testIteratorsMethod · 0.36
testAddRemoveClearMethod · 0.36
testIteratorsMethod · 0.36
testConvertersMethod · 0.36
testAddRemoveClearMethod · 0.36
testFindMethod · 0.36