forked from qt-creator/qt-creator
C++: replace a tree by a hash
Be more environment friendly by using less trees. Change-Id: I54d3b23d697a3b72a6a803688a8da0eddaad3e17 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
b9c64a392a
commit
3eaf044045
@@ -428,8 +428,7 @@ void TranslationUnit::getPosition(unsigned tokenOffset,
|
||||
|
||||
// If this token is expanded we already have the information directly from the expansion
|
||||
// section header. Otherwise, we need to calculate it.
|
||||
std::map<unsigned, std::pair<unsigned, unsigned> >::const_iterator it =
|
||||
_expandedLineColumn.find(tokenOffset);
|
||||
TokenLineColumn::const_iterator it = _expandedLineColumn.find(tokenOffset);
|
||||
if (it != _expandedLineColumn.end()) {
|
||||
lineNumber = it->second.first;
|
||||
columnNumber = it->second.second + 1;
|
||||
@@ -554,8 +553,7 @@ bool TranslationUnit::maybeSplitGreaterGreaterToken(unsigned tokenIndex)
|
||||
|
||||
_tokens->insert(_tokens->begin() + tokenIndex + 1, newGreater);
|
||||
|
||||
std::map<unsigned, std::pair<unsigned, unsigned> >::const_iterator it =
|
||||
_expandedLineColumn.find(tok.offset);
|
||||
TokenLineColumn::const_iterator it = _expandedLineColumn.find(tok.offset);
|
||||
if (it != _expandedLineColumn.end()) {
|
||||
const std::pair<unsigned, unsigned> newPosition(it->second.first, it->second.second + 1);
|
||||
_expandedLineColumn.insert(std::make_pair(newGreater.offset, newPosition));
|
||||
|
||||
Reference in New Issue
Block a user