diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmRST.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 14e8ad9..c261d57 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -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()); } |