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

Function ArrTest

IDEHelper/Compiler/BfCompiler.cpp:5776–5805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5774//////////////////////////////////////////////////////////////////////////
5775
5776int ArrTest()
5777{
5778 //SizedArray<int, 8> intArr;
5779 //Array<int> intArr;
5780 //std::vector<int> intArr;
5781 BfSizedVector<int, 8> intArr;
5782
5783 //int val = intArr.GetLastSafe();
5784
5785 intArr.push_back(123);
5786 intArr.pop_back();
5787 intArr.push_back(234);
5788
5789 intArr.push_back(345);
5790 //intArr.push_back(567);
5791
5792 //auto itr = std::find(intArr.begin(), intArr.end(), 234);
5793 //intArr.erase(itr);
5794
5795 for (auto itr = intArr.begin(); itr != intArr.end(); )
5796 {
5797 if (*itr == 234)
5798 itr = intArr.erase(itr);
5799 else
5800 itr++;
5801 }
5802
5803 return (int)intArr.size();
5804 //intArr.RemoveAt(2);
5805}
5806
5807//////////////////////////////////////////////////////////////////////////
5808

Callers

nothing calls this directly

Calls 6

push_backMethod · 0.45
pop_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected