Browse Source

cmGeneratorTarget: Constify the AddObject API.

The storage is already const.
Stephen Kelly 11 years ago
parent
commit
bc51221164
2 changed files with 3 additions and 2 deletions
  1. 2 1
      Source/cmGeneratorTarget.cxx
  2. 1 1
      Source/cmGeneratorTarget.h

+ 2 - 1
Source/cmGeneratorTarget.cxx

@@ -321,7 +321,8 @@ const std::string& cmGeneratorTarget::GetObjectName(cmSourceFile const* file)
   return this->Objects[file];
 }
 
-void cmGeneratorTarget::AddObject(cmSourceFile *sf, std::string const&name)
+void cmGeneratorTarget::AddObject(cmSourceFile const* sf,
+                                  std::string const&name)
 {
     this->Objects[sf] = name;
 }

+ 1 - 1
Source/cmGeneratorTarget.h

@@ -35,7 +35,7 @@ public:
   void GetObjectSources(std::vector<cmSourceFile*> &) const;
   const std::string& GetObjectName(cmSourceFile const* file);
 
-  void AddObject(cmSourceFile *sf, std::string const&name);
+  void AddObject(cmSourceFile const* sf, std::string const&name);
   bool HasExplicitObjectName(cmSourceFile const* file) const;
   void AddExplicitObjectName(cmSourceFile* sf);