summaryrefslogtreecommitdiffstats
path: root/Source/cmMessageCommand.cxx
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2019-04-27 08:31:33 (GMT)
committerCraig Scott <craig.scott@crascit.com>2019-04-28 12:45:44 (GMT)
commit599587feb1685eb75b7efe32cfcc16fed13d65b5 (patch)
tree97df46fa6ce8b989c9c00b4f963e1164a34431d5 /Source/cmMessageCommand.cxx
parent6cc93b370ef59208b9b468ebc9d84cc02e3cbd85 (diff)
downloadCMake-599587feb1685eb75b7efe32cfcc16fed13d65b5.zip
CMake-599587feb1685eb75b7efe32cfcc16fed13d65b5.tar.gz
CMake-599587feb1685eb75b7efe32cfcc16fed13d65b5.tar.bz2
message(): Minor code modernization
Diffstat (limited to 'Source/cmMessageCommand.cxx')
-rw-r--r--Source/cmMessageCommand.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 7242037..5320ec5 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -22,11 +22,11 @@ bool cmMessageCommand::InitialPass(std::vector<std::string> const& args,
this->SetError("called with incorrect number of arguments");
return false;
}
- std::vector<std::string>::const_iterator i = args.begin();
+ auto i = args.cbegin();
- MessageType type = MessageType::MESSAGE;
- bool status = false;
- bool fatal = false;
+ auto type = MessageType::MESSAGE;
+ auto status = false;
+ auto fatal = false;
auto level = cmake::LogLevel::LOG_UNDEFINED;
if (*i == "SEND_ERROR") {
type = MessageType::FATAL_ERROR;
@@ -103,7 +103,7 @@ bool cmMessageCommand::InitialPass(std::vector<std::string> const& args,
return true;
}
- std::string message = cmJoin(cmMakeRange(i, args.end()), std::string());
+ auto message = cmJoin(cmMakeRange(i, args.cend()), "");
if (type != MessageType::MESSAGE) {
// we've overridden the message type, above, so display it directly