| 1871 | ////////////////////////////////////////////////////////////////////////// |
| 1872 | |
| 1873 | void BeInstEnumerator::Next() |
| 1874 | { |
| 1875 | if (mRemoveCurrent) |
| 1876 | { |
| 1877 | if ((mWriteIdx > 0) && (mReadIdx < mBlock->mInstructions.size() - 1)) |
| 1878 | mContext->MergeInstFlags(mBlock->mInstructions[mWriteIdx - 1], mBlock->mInstructions[mReadIdx], mBlock->mInstructions[mReadIdx + 1]); |
| 1879 | |
| 1880 | mBlock->mInstructions[mReadIdx] = NULL; |
| 1881 | mRemoveCurrent = false; |
| 1882 | } |
| 1883 | else |
| 1884 | { |
| 1885 | if (mWriteIdx != mReadIdx) |
| 1886 | { |
| 1887 | mBlock->mInstructions[mWriteIdx] = mBlock->mInstructions[mReadIdx]; |
| 1888 | mBlock->mInstructions[mReadIdx] = NULL; |
| 1889 | } |
| 1890 | mWriteIdx++; |
| 1891 | } |
| 1892 | |
| 1893 | mReadIdx++; |
| 1894 | } |
| 1895 | |
| 1896 | ////////////////////////////////////////////////////////////////////////// |
| 1897 |
no test coverage detected