cmRST: Use std::min where appropriate.
This commit is contained in:
parent
21b0654ace
commit
dfe49c2056
@ -463,10 +463,7 @@ void cmRST::UnindentLines(std::vector<std::string>& lines)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Truncate indentation to match that on this line.
|
// Truncate indentation to match that on this line.
|
||||||
if(line.size() < indentEnd)
|
indentEnd = std::min(indentEnd, line.size());
|
||||||
{
|
|
||||||
indentEnd = line.size();
|
|
||||||
}
|
|
||||||
for(std::string::size_type j = 0; j != indentEnd; ++j)
|
for(std::string::size_type j = 0; j != indentEnd; ++j)
|
||||||
{
|
{
|
||||||
if(line[j] != indentText[j])
|
if(line[j] != indentText[j])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user