diff --git a/Source/cmCableClassSet.cxx b/Source/cmCableClassSet.cxx index 75f284e2d..85dc4b4cc 100644 --- a/Source/cmCableClassSet.cxx +++ b/Source/cmCableClassSet.cxx @@ -41,6 +41,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "cmCableClassSet.h" +/** + * Add to the set of required sources to define the class. + */ +void cmCableClass::AddSources(const Sources& sources) +{ + for(Sources::const_iterator s = sources.begin(); s != sources.end(); ++s) + { + m_Sources.insert(*s); + } +} + + /** * Add to the set of required sources to define the class. */ @@ -178,7 +190,7 @@ void cmCableClassSet::ParseAndAddElement(const char* element, else { cmCableClass cableClass; - cableClass.AddSources(sources.begin(), sources.end()); + cableClass.AddSources(sources); this->AddClass(className.c_str(), cableClass); } } @@ -194,7 +206,7 @@ void cmCableClassSet::AddCableClassSet(const cmCableClassSet& set, for(CableClassMap::const_iterator c = set.Begin(); c != set.End(); ++c) { cmCableClass cableClass = c->second; - cableClass.AddSources(sources.begin(), sources.end()); + cableClass.AddSources(sources); this->AddClass(c->first.c_str(), cableClass); } } diff --git a/Source/cmCableClassSet.h b/Source/cmCableClassSet.h index 422f1e9f0..42639528b 100644 --- a/Source/cmCableClassSet.h +++ b/Source/cmCableClassSet.h @@ -54,9 +54,7 @@ class cmCableClass public: typedef std::set Sources; - template - void AddSources(InputIterator first, InputIterator last) - { for(InputIterator i = first; i != last; ++i) { m_Sources.insert(*i); } } + void AddSources(const Sources& sources); void AddSource(const char*); Sources::const_iterator SourcesBegin() const { return m_Sources.begin(); }