From d92887efabad6a91e221588d0dc7a0bffd91a9f7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 15 Jan 2015 00:06:11 +0100 Subject: Replace 'foo.size() > 0' pattern with !foo.empty(). --- Source/cmGeneratorExpressionParser.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/cmGeneratorExpressionParser.cxx') diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index ec15dafd34..a17da8cb5d 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -39,7 +39,7 @@ void cmGeneratorExpressionParser::Parse( static void extendText(std::vector &result, std::vector::const_iterator it) { - if (result.size() > 0 + if (!result.empty() && (*(result.end() - 1))->GetType() == cmGeneratorExpressionEvaluator::Text) { @@ -57,7 +57,7 @@ static void extendText(std::vector &result, static void extendResult(std::vector &result, const std::vector &contents) { - if (result.size() > 0 + if (!result.empty() && (*(result.end() - 1))->GetType() == cmGeneratorExpressionEvaluator::Text && (*contents.begin())->GetType() @@ -256,7 +256,7 @@ void cmGeneratorExpressionParser::ParseContent( { if (this->NestingLevel == 0) { - if (result.size() > 0 + if (!result.empty() && (*(result.end() - 1))->GetType() == cmGeneratorExpressionEvaluator::Text) { -- cgit v1.2.1