diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-03 22:00:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:30 (GMT) |
commit | 971eb4d56e3d3c9bc11acf6082e21d5388d808bb (patch) | |
tree | d595c3f099b5341a5854f146cdd3a9fcaf23c1a8 /Source/cmSourceFile.cxx | |
parent | 310ef08fed57b1c60ea8dc8ed98520e2cb0bff4e (diff) | |
download | CMake-971eb4d56e3d3c9bc11acf6082e21d5388d808bb.zip CMake-971eb4d56e3d3c9bc11acf6082e21d5388d808bb.tar.gz CMake-971eb4d56e3d3c9bc11acf6082e21d5388d808bb.tar.bz2 |
stringapi: Use strings for TryFullPath
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r-- | Source/cmSourceFile.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 9feda6c..f052044 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -164,7 +164,7 @@ bool cmSourceFile::FindFullPath(std::string* error) } tryPath += this->Location.GetName(); tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str(), *di); - if(this->TryFullPath(tryPath.c_str(), 0)) + if(this->TryFullPath(tryPath.c_str(), "")) { return true; } @@ -217,10 +217,11 @@ bool cmSourceFile::FindFullPath(std::string* error) } //---------------------------------------------------------------------------- -bool cmSourceFile::TryFullPath(const char* tp, const char* ext) +bool cmSourceFile::TryFullPath(const std::string& path, + const std::string& ext) { - std::string tryPath = tp; - if(ext && *ext) + std::string tryPath = path; + if(!ext.empty()) { tryPath += "."; tryPath += ext; |