diff options
author | Cengizhan Pasaoglu <cengizhanpasaoglu@gmail.com> | 2020-10-17 23:00:29 (GMT) |
---|---|---|
committer | Cengizhan Pasaoglu <cengizhanpasaoglu@gmail.com> | 2020-10-19 21:04:04 (GMT) |
commit | bd705788f67741df88bf153825a5943b4b518818 (patch) | |
tree | 356596cc5ca5d3f2ad2de7954257903301143bd8 /Source/cmTarget.cxx | |
parent | c05e561474c422d23b9f1d29ccb5ceea0037477b (diff) | |
download | CMake-bd705788f67741df88bf153825a5943b4b518818.zip CMake-bd705788f67741df88bf153825a5943b4b518818.tar.gz CMake-bd705788f67741df88bf153825a5943b4b518818.tar.bz2 |
Constify some code as suggested by clang-tidy
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index e076d1e..4eebec6 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -213,7 +213,7 @@ public: bool CheckImportedLibName(std::string const& prop, std::string const& value) const; - std::string ProcessSourceItemCMP0049(const std::string& s); + std::string ProcessSourceItemCMP0049(const std::string& s) const; }; namespace { @@ -740,7 +740,8 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs) } } -std::string cmTargetInternals::ProcessSourceItemCMP0049(const std::string& s) +std::string cmTargetInternals::ProcessSourceItemCMP0049( + const std::string& s) const { std::string src = s; @@ -791,7 +792,7 @@ struct CreateLocation { } - cmSourceFileLocation operator()(const std::string& filename) + cmSourceFileLocation operator()(const std::string& filename) const { return cmSourceFileLocation(this->Makefile, filename); } @@ -857,7 +858,7 @@ cmSourceFile* cmTarget::AddSource(const std::string& src, bool before) cmSourceFileLocationKind::Known); } -void cmTarget::ClearDependencyInformation(cmMakefile& mf) +void cmTarget::ClearDependencyInformation(cmMakefile& mf) const { std::string depname = cmStrCat(this->GetName(), "_LIB_DEPENDS"); mf.RemoveCacheDefinition(depname); |