diff options
author | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2018-01-31 18:20:02 +0300 |
---|---|---|
committer | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2018-01-31 18:23:03 +0300 |
commit | 653b894683abe63233cb8679b34ea39d9017e317 (patch) | |
tree | 200e5066b754d8ddfdc7beb86c4db179aa2e69d0 /Source/cmAddCustomCommandCommand.cxx | |
parent | 4499cc8bb65e217e1cb2959452ed391af82e757b (diff) | |
download | cmake-653b894683abe63233cb8679b34ea39d9017e317.tar.gz |
Reduce raw string pointers usage.
* Change some functions to take `std::string` instead of
`const char*` in the following classes: `cmMakeFile`, `cmake`,
`cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator`
and a few others.
* Greatly reduce using of `const char*` overloads for
`cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r-- | Source/cmAddCustomCommandCommand.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 14dfdaeda4..a262f80051 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -127,7 +127,7 @@ bool cmAddCustomCommandCommand::InitialPass( case doing_output: case doing_outputs: case doing_byproducts: - if (!cmSystemTools::FileIsFullPath(copy.c_str())) { + if (!cmSystemTools::FileIsFullPath(copy)) { // This is an output to be generated, so it should be // under the build tree. CMake 2.4 placed this under the // source tree. However the only case that this change @@ -154,7 +154,7 @@ bool cmAddCustomCommandCommand::InitialPass( break; } - if (cmSystemTools::FileIsFullPath(filename.c_str())) { + if (cmSystemTools::FileIsFullPath(filename)) { filename = cmSystemTools::CollapseFullPath(filename); } switch (doing) { @@ -355,7 +355,7 @@ bool cmAddCustomCommandCommand::CheckOutputs( for (std::string const& o : outputs) { // Make sure the file will not be generated into the source // directory during an out of source build. - if (!this->Makefile->CanIWriteThisFile(o.c_str())) { + if (!this->Makefile->CanIWriteThisFile(o)) { std::string e = "attempted to have a file \"" + o + "\" in a source directory as an output of custom command."; this->SetError(e); |