MCPcopy Create free account
hub / github.com/beefytech/Beef / Iterator

Class Iterator

IDEHelper/Compiler/BfResolvedTypeUtils.h:2772–2809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2770 };
2771
2772 class Iterator : public MultiHashSet<BfType*, AllocatorCLib>::Iterator
2773 {
2774 public:
2775 Iterator(MultiHashSet* set) : MultiHashSet::Iterator(set)
2776 {
2777
2778 }
2779
2780 Iterator(const MultiHashSet::Iterator& itr) : MultiHashSet::Iterator(itr.mSet)
2781 {
2782 *((MultiHashSet::Iterator*)this) = itr;
2783 }
2784
2785 // NULLs can occur in rare instances since we insert a preliminary "NULL" during insertion up until we actually construct the final type
2786 void MovePastNulls()
2787 {
2788 while (this->mCurEntry != -1)
2789 {
2790 BF_ASSERT(this->mCurEntry < this->mSet->mAllocSize);
2791 if (this->mSet->mEntries[this->mCurEntry].mValue != NULL)
2792 break;
2793 ++(*((MultiHashSet::Iterator*)this));
2794 }
2795 }
2796
2797 Iterator& operator++()
2798 {
2799 ++(*((MultiHashSet::Iterator*)this));
2800 MovePastNulls();
2801 return *this;
2802 }
2803
2804 Iterator& operator=(const MultiHashSet::Iterator& itr)
2805 {
2806 *((MultiHashSet::Iterator*)this) = itr;
2807 return *this;
2808 }
2809 };
2810
2811public:
2812 static BfTypeDef* FindRootCommonOuterType(BfTypeDef* outerType, LookupContext* ctx, BfTypeInstance*& outCheckTypeInstance);

Callers 2

beginMethod · 0.70
EraseMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected