mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 11:18:40 +08:00
cmRST: Replace two erase with a rotate and larger erase.
This commit is contained in:
@@ -497,6 +497,10 @@ void cmRST::UnindentLines(std::vector<std::string>& lines)
|
|||||||
{
|
{
|
||||||
++trailingEmpty;
|
++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());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user