cmRST: Replace two erase with a rotate and larger erase.
This commit is contained in:
parent
61fe1919de
commit
8c74a41ff3
|
@ -497,6 +497,10 @@ void cmRST::UnindentLines(std::vector<std::string>& lines)
|
|||
{
|
||||
++trailingEmpty;
|
||||
}
|
||||
lines.erase(lines.begin(), lines.begin()+leadingEmpty);
|
||||
lines.erase(lines.end()-trailingEmpty, lines.end());
|
||||
|
||||
std::vector<std::string>::iterator contentEnd
|
||||
= cmRotate(lines.begin(),
|
||||
lines.begin() + leadingEmpty,
|
||||
lines.end() - trailingEmpty);
|
||||
lines.erase(contentEnd, lines.end());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue