summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-11 22:43:55 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-20 20:36:58 (GMT)
commitdfe49c205654a51f860507ea5d8ad133b2a4f064 (patch)
tree8537643c12d8fa194dc7c6c6c5a0ab13a9a5aca7
parent21b0654ace2ce58d191c2e42a8583b05614cd037 (diff)
downloadCMake-dfe49c205654a51f860507ea5d8ad133b2a4f064.zip
CMake-dfe49c205654a51f860507ea5d8ad133b2a4f064.tar.gz
CMake-dfe49c205654a51f860507ea5d8ad133b2a4f064.tar.bz2
cmRST: Use std::min where appropriate.
-rw-r--r--Source/cmRST.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index d20d999..da72ab7 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -463,10 +463,7 @@ void cmRST::UnindentLines(std::vector<std::string>& 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])