diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-06 19:05:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:29 (GMT) |
commit | 310ef08fed57b1c60ea8dc8ed98520e2cb0bff4e (patch) | |
tree | 89b17e537dd73551de0c5c225b18a6bfbee2ed8b /Source/cmSourceFileLocation.cxx | |
parent | 24e8b929eef74098d4ddf4581619322e0f4b5108 (diff) | |
download | CMake-310ef08fed57b1c60ea8dc8ed98520e2cb0bff4e.zip CMake-310ef08fed57b1c60ea8dc8ed98520e2cb0bff4e.tar.gz CMake-310ef08fed57b1c60ea8dc8ed98520e2cb0bff4e.tar.bz2 |
stringapi: Use strings for source names
Diffstat (limited to 'Source/cmSourceFileLocation.cxx')
-rw-r--r-- | Source/cmSourceFileLocation.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 5a8578b..832a6a7 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -18,9 +18,10 @@ //---------------------------------------------------------------------------- cmSourceFileLocation -::cmSourceFileLocation(cmMakefile const* mf, const char* name): Makefile(mf) +::cmSourceFileLocation(cmMakefile const* mf, const std::string& name) + : Makefile(mf) { - this->AmbiguousDirectory = !cmSystemTools::FileIsFullPath(name); + this->AmbiguousDirectory = !cmSystemTools::FileIsFullPath(name.c_str()); this->AmbiguousExtension = true; this->Directory = cmSystemTools::GetFilenamePath(name); this->Name = cmSystemTools::GetFilenameName(name); @@ -28,7 +29,7 @@ cmSourceFileLocation } //---------------------------------------------------------------------------- -void cmSourceFileLocation::Update(const char* name) +void cmSourceFileLocation::Update(const std::string& name) { if(this->AmbiguousDirectory) { @@ -80,7 +81,7 @@ void cmSourceFileLocation::DirectoryUseBinary() } //---------------------------------------------------------------------------- -void cmSourceFileLocation::UpdateExtension(const char* name) +void cmSourceFileLocation::UpdateExtension(const std::string& name) { // Check the extension. std::string ext = cmSystemTools::GetFilenameLastExtension(name); @@ -136,10 +137,10 @@ void cmSourceFileLocation::UpdateExtension(const char* name) } //---------------------------------------------------------------------------- -void cmSourceFileLocation::UpdateDirectory(const char* name) +void cmSourceFileLocation::UpdateDirectory(const std::string& name) { // If a full path was given we know the directory. - if(cmSystemTools::FileIsFullPath(name)) + if(cmSystemTools::FileIsFullPath(name.c_str())) { this->Directory = cmSystemTools::GetFilenamePath(name); this->AmbiguousDirectory = false; |