diff options
author | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2018-01-31 15:20:02 (GMT) |
---|---|---|
committer | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2018-01-31 15:23:03 (GMT) |
commit | 653b894683abe63233cb8679b34ea39d9017e317 (patch) | |
tree | 200e5066b754d8ddfdc7beb86c4db179aa2e69d0 /Source/cmOSXBundleGenerator.cxx | |
parent | 4499cc8bb65e217e1cb2959452ed391af82e757b (diff) | |
download | CMake-653b894683abe63233cb8679b34ea39d9017e317.zip CMake-653b894683abe63233cb8679b34ea39d9017e317.tar.gz CMake-653b894683abe63233cb8679b34ea39d9017e317.tar.bz2 |
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/cmOSXBundleGenerator.cxx')
-rw-r--r-- | Source/cmOSXBundleGenerator.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index e658e2c..2b96785 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -43,7 +43,7 @@ void cmOSXBundleGenerator::CreateAppBundle(const std::string& targetName, out += "/"; out += this->GT->GetAppBundleDirectory(this->ConfigName, cmGeneratorTarget::FullLevel); - cmSystemTools::MakeDirectory(out.c_str()); + cmSystemTools::MakeDirectory(out); this->Makefile->AddCMakeOutputFile(out); // Configure the Info.plist file. Note that it needs the executable name @@ -105,10 +105,10 @@ void cmOSXBundleGenerator::CreateFramework(const std::string& targetName, // Make foo.framework/Versions std::string versions = contentdir; versions += "Versions"; - cmSystemTools::MakeDirectory(versions.c_str()); + cmSystemTools::MakeDirectory(versions); // Make foo.framework/Versions/version - cmSystemTools::MakeDirectory(newoutpath.c_str()); + cmSystemTools::MakeDirectory(newoutpath); // Current -> version oldName = frameworkVersion; @@ -173,7 +173,7 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName, out += "/"; out += this->GT->GetCFBundleDirectory(this->ConfigName, cmGeneratorTarget::FullLevel); - cmSystemTools::MakeDirectory(out.c_str()); + cmSystemTools::MakeDirectory(out); this->Makefile->AddCMakeOutputFile(out); // Configure the Info.plist file. Note that it needs the executable name @@ -213,7 +213,7 @@ std::string cmOSXBundleGenerator::InitMacOSXContentDirectory( this->ConfigName, cmStateEnums::RuntimeBinaryArtifact); macdir += "/"; macdir += pkgloc; - cmSystemTools::MakeDirectory(macdir.c_str()); + cmSystemTools::MakeDirectory(macdir); // Record use of this content location. Only the first level // directory is needed. |