diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-02-01 11:50:28 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-02-02 17:39:22 (GMT) |
commit | cd8a930d61f0aa6c139b1f81302c9258b4102012 (patch) | |
tree | 2bff1e4aef7736ee7655cf6b0053c50d541090ef /Source/cmSourceFileLocation.cxx | |
parent | 6d407ae439f1db086dd7a3675c8efce93a19fed3 (diff) | |
download | CMake-cd8a930d61f0aa6c139b1f81302c9258b4102012.zip CMake-cd8a930d61f0aa6c139b1f81302c9258b4102012.tar.gz CMake-cd8a930d61f0aa6c139b1f81302c9258b4102012.tar.bz2 |
cmSourceFile: Refactor FindFullPath method
Refactors the cmSourceFile::FindFullPath method to
use lambdas.
Diffstat (limited to 'Source/cmSourceFileLocation.cxx')
-rw-r--r-- | Source/cmSourceFileLocation.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 13d2d7e..acacba2 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -42,6 +42,16 @@ cmSourceFileLocation::cmSourceFileLocation(cmMakefile const* mf, } } +std::string cmSourceFileLocation::GetFullPath() const +{ + std::string path = this->GetDirectory(); + if (!path.empty()) { + path += '/'; + } + path += this->GetName(); + return path; +} + void cmSourceFileLocation::Update(cmSourceFileLocation const& loc) { if (this->AmbiguousDirectory && !loc.AmbiguousDirectory) { |