diff options
author | Artur Ryt <artur.ryt@gmail.com> | 2019-02-04 21:56:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-06 15:43:16 (GMT) |
commit | f3534386b504430aec926e46a413b044ff64d769 (patch) | |
tree | cb29c859cee6cdc69c0d8b25d719b4096be53ff8 /Source/cmGeneratorExpressionParser.cxx | |
parent | 062cfd991faac000d484c74e5af7d65726c655dc (diff) | |
download | CMake-f3534386b504430aec926e46a413b044ff64d769.zip CMake-f3534386b504430aec926e46a413b044ff64d769.tar.gz CMake-f3534386b504430aec926e46a413b044ff64d769.tar.bz2 |
Prefer front/back/data over dereferencing begin/rbegin iter
Changed for sequenced containers: vector, list, string and array
Diffstat (limited to 'Source/cmGeneratorExpressionParser.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionParser.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index 949a86d..7aa3314 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -47,11 +47,11 @@ static void extendResult( if (!result.empty() && (*(result.end() - 1))->GetType() == cmGeneratorExpressionEvaluator::Text && - (*contents.begin())->GetType() == cmGeneratorExpressionEvaluator::Text) { + contents.front()->GetType() == cmGeneratorExpressionEvaluator::Text) { TextContent* textContent = static_cast<TextContent*>(*(result.end() - 1)); textContent->Extend( - static_cast<TextContent*>(*contents.begin())->GetLength()); - delete *contents.begin(); + static_cast<TextContent*>(contents.front())->GetLength()); + delete contents.front(); result.insert(result.end(), contents.begin() + 1, contents.end()); } else { result.insert(result.end(), contents.begin(), contents.end()); |