diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index d20d99962..da72ab702 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -463,10 +463,7 @@ void cmRST::UnindentLines(std::vector& lines) } // Truncate indentation to match that on this line. - if(line.size() < indentEnd) - { - indentEnd = line.size(); - } + indentEnd = std::min(indentEnd, line.size()); for(std::string::size_type j = 0; j != indentEnd; ++j) { if(line[j] != indentText[j])