summaryrefslogtreecommitdiff
path: root/Source/cmOutputRequiredFilesCommand.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-05-14 09:16:11 -0400
committerBrad King <brad.king@kitware.com>2019-05-15 10:20:05 -0400
commit23e8364aedcbeb7ce606b6075c98827e52f0c7f6 (patch)
tree66d765b7cc87c36b24efa83b4749ee0959863666 /Source/cmOutputRequiredFilesCommand.cxx
parente2d0aea2c734c8c5028f3573082e75bd157dbe72 (diff)
downloadcmake-23e8364aedcbeb7ce606b6075c98827e52f0c7f6.tar.gz
Source: std::string related cleanup
Diffstat (limited to 'Source/cmOutputRequiredFilesCommand.cxx')
-rw-r--r--Source/cmOutputRequiredFilesCommand.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx
index cb9433f4d1..4ed55818a1 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -293,8 +293,8 @@ protected:
// Make sure we don't visit the same file more than once.
info->DependDone = true;
- const char* path = info->FullPath.c_str();
- if (!path) {
+ const std::string& path = info->FullPath;
+ if (path.empty()) {
cmSystemTools::Error(
"Attempt to find dependencies for file without path!");
return;
@@ -356,7 +356,7 @@ protected:
if (!found) {
// Couldn't find any dependency information.
if (this->ComplainFileRegularExpression.find(info->IncludeName)) {
- cmSystemTools::Error("error cannot find dependencies for ", path);
+ cmSystemTools::Error("error cannot find dependencies for " + path);
} else {
// Destroy the name of the file so that it won't be output as a
// dependency.