summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFileLocation.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-02-01 11:50:28 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-02-02 17:39:22 (GMT)
commitcd8a930d61f0aa6c139b1f81302c9258b4102012 (patch)
tree2bff1e4aef7736ee7655cf6b0053c50d541090ef /Source/cmSourceFileLocation.cxx
parent6d407ae439f1db086dd7a3675c8efce93a19fed3 (diff)
downloadCMake-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.cxx10
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) {