From 2ee1cb85e855ce0596e85ef1fc53c5c25cc1465f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 9 Oct 2015 23:15:40 +0200 Subject: [PATCH] cmTarget: Move ImportInfoMap out of internal class. --- Source/cmTarget.cxx | 12 ++++-------- Source/cmTarget.h | 3 +++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 369e49717..847a5c1b1 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -64,9 +64,6 @@ const char* cmTarget::GetTargetTypeName(TargetType targetType) class cmTargetInternals { public: - typedef std::map ImportInfoMapType; - ImportInfoMapType ImportInfoMap; - std::vector IncludeDirectoriesEntries; std::vector IncludeDirectoriesBacktraces; std::vector CompileOptionsEntries; @@ -1538,7 +1535,7 @@ void cmTarget::MaybeInvalidatePropertyCache(const std::string& prop) // Wipe out maps caching information affected by this property. if(this->IsImported() && cmHasLiteralPrefix(prop, "IMPORTED")) { - this->Internal->ImportInfoMap.clear(); + this->ImportInfoMap.clear(); } } @@ -2288,16 +2285,15 @@ cmTarget::GetImportInfo(const std::string& config) const { config_upper = "NOCONFIG"; } - typedef cmTargetInternals::ImportInfoMapType ImportInfoMapType; ImportInfoMapType::const_iterator i = - this->Internal->ImportInfoMap.find(config_upper); - if(i == this->Internal->ImportInfoMap.end()) + this->ImportInfoMap.find(config_upper); + if(i == this->ImportInfoMap.end()) { ImportInfo info; this->ComputeImportInfo(config_upper, info); ImportInfoMapType::value_type entry(config_upper, info); - i = this->Internal->ImportInfoMap.insert(entry).first; + i = this->ImportInfoMap.insert(entry).first; } if(this->GetType() == INTERFACE_LIBRARY) diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 03c4cbeb0..97515a7f3 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -449,6 +449,9 @@ private: std::string SharedDeps; }; + typedef std::map ImportInfoMapType; + mutable ImportInfoMapType ImportInfoMap; + ImportInfo const* GetImportInfo(const std::string& config) const; void ComputeImportInfo(std::string const& desired_config, ImportInfo& info) const;