mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-22 16:07:49 +08:00
cmRST: Use std::min where appropriate.
This commit is contained in:
@@ -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])
|
||||||
|
Reference in New Issue
Block a user