Consistent renaming of 'counters' and 'sequence' to 'index'

This commit is contained in:
Leonardo Alt
2018-10-17 15:58:13 +02:00
parent ec39fdcb3c
commit aa23326e06
10 changed files with 71 additions and 71 deletions
+6 -6
View File
@@ -34,19 +34,19 @@ public:
void resetIndex();
/// This function returns the current index of this SSA variable.
int index() const { return m_currentSequenceCounter; }
int& index() { return m_currentSequenceCounter; }
int index() const { return m_currentIndex; }
int& index() { return m_currentIndex; }
int operator++()
{
return m_currentSequenceCounter = (*m_nextFreeSequenceCounter)++;
return m_currentIndex = (*m_nextFreeIndex)++;
}
private:
int m_currentSequenceCounter;
/// The next free sequence counter is a shared pointer because we want
int m_currentIndex;
/// The next free index is a shared pointer because we want
/// the copy and the copied to share it.
std::shared_ptr<int> m_nextFreeSequenceCounter;
std::shared_ptr<int> m_nextFreeIndex;
};
}