summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-12 22:06:05 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-13 14:27:23 (GMT)
commit9ad804ac7be18efb92040434808f89174586b13d (patch)
treef439c944534f4ad1e01a5ec7810369b67b36de81 /Source/cmGeneratorTarget.cxx
parentc725bb3cbd51edd4043f81d01b7a01bbd42adb2f (diff)
downloadCMake-9ad804ac7be18efb92040434808f89174586b13d.zip
CMake-9ad804ac7be18efb92040434808f89174586b13d.tar.gz
CMake-9ad804ac7be18efb92040434808f89174586b13d.tar.bz2
cmGeneratorTarget: Constify cmSourceFile* in containers.
Some of them will be used with other APIs which require value_type to be cmSourceFile const*.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index bde60b8..8efd7bb 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -97,7 +97,7 @@ struct DoAccept
template<>
struct DoAccept<true>
{
- static void Do(std::vector<cmSourceFile*>& files, cmSourceFile* f)
+ static void Do(std::vector<cmSourceFile const*>& files, cmSourceFile* f)
{
files.push_back(f);
}
@@ -120,7 +120,7 @@ struct DoAccept<true>
};
//----------------------------------------------------------------------------
-template<typename Tag, typename DataType = std::vector<cmSourceFile*> >
+template<typename Tag, typename DataType = std::vector<cmSourceFile const*> >
struct TagVisitor
{
DataType& Data;
@@ -306,7 +306,8 @@ static void handleSystemIncludesDep(cmMakefile *mf, cmTarget* depTgt,
//----------------------------------------------------------------------------
void
-cmGeneratorTarget::GetObjectSources(std::vector<cmSourceFile*> &data) const
+cmGeneratorTarget
+::GetObjectSources(std::vector<cmSourceFile const*> &data) const
{
IMPLEMENT_VISIT(ObjectSources);
if (this->Target->GetType() == cmTarget::OBJECT_LIBRARY)
@@ -342,34 +343,39 @@ bool cmGeneratorTarget::HasExplicitObjectName(cmSourceFile const* file) const
}
//----------------------------------------------------------------------------
-void cmGeneratorTarget::GetIDLSources(std::vector<cmSourceFile*>& data) const
+void cmGeneratorTarget
+::GetIDLSources(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(IDLSources);
}
//----------------------------------------------------------------------------
void
-cmGeneratorTarget::GetHeaderSources(std::vector<cmSourceFile*>& data) const
+cmGeneratorTarget
+::GetHeaderSources(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(HeaderSources);
}
//----------------------------------------------------------------------------
-void cmGeneratorTarget::GetExtraSources(std::vector<cmSourceFile*>& data) const
+void cmGeneratorTarget
+::GetExtraSources(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(ExtraSources);
}
//----------------------------------------------------------------------------
void
-cmGeneratorTarget::GetCustomCommands(std::vector<cmSourceFile*>& data) const
+cmGeneratorTarget
+::GetCustomCommands(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(CustomCommands);
}
//----------------------------------------------------------------------------
void
-cmGeneratorTarget::GetExternalObjects(std::vector<cmSourceFile*>& data) const
+cmGeneratorTarget
+::GetExternalObjects(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(ExternalObjects);
}
@@ -384,7 +390,8 @@ cmGeneratorTarget::GetExpectedResxHeaders(std::set<std::string>& srcs) const
}
//----------------------------------------------------------------------------
-void cmGeneratorTarget::GetResxSources(std::vector<cmSourceFile*>& srcs) const
+void cmGeneratorTarget
+::GetResxSources(std::vector<cmSourceFile const*>& srcs) const
{
ResxData data;
IMPLEMENT_VISIT_IMPL(Resx, COMMA cmGeneratorTarget::ResxData)
@@ -570,7 +577,7 @@ cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs) const
cmTarget* objLib = *ti;
cmGeneratorTarget* ogt =
this->GlobalGenerator->GetGeneratorTarget(objLib);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = ogt->ObjectSources.begin();
si != ogt->ObjectSources.end(); ++si)
{