@@ -96,23 +96,24 @@ class NamedObjectVector {
9696
9797 // / Delete a named object from the container.
9898 // /
99- // / Please not the name object is just removed, not
99+ // / Please note that the name object is just removed, not
100100 // / destroyed. The object holder (unique_ptr) is returned
101101 // / to caller for further finalization
102102 template <typename T>
103103 std::unique_ptr<T> DeleteObj (const std::string &name) {
104-
105104 auto oldObjPtr = DeleteObj<NamedObject>(name);
106105 auto oldDerivedPtr = oldObjPtr ?
107106 dynamic_uptr_cast<T>(std::move (oldObjPtr)) :
108107 std::unique_ptr<T>();
109108 return std::move (oldDerivedPtr);
110-
111109 }
112-
110+
111+ // DeleteObj explicit instantiation for NamedObject
113112 template <>
114113 NamedObjectUPtr DeleteObj<NamedObject>(const std::string &name);
115114
115+
116+
116117 void DeleteObjs (const std::vector<std::string> &names);
117118
118119 bool IsObjDefined (const std::string &name) const ;
@@ -176,13 +177,19 @@ class NamedObjectVector {
176177
177178};
178179
180+
181+
179182// Specialization (declaration) of DefineObj for NamedObject class, so that
180183// derived classes can rely on it
181184template <>
182185std::tuple< NamedObject&, std::unique_ptr<NamedObject> >
183186NamedObjectVector::DefineObj (std::unique_ptr<NamedObject>&& obj);
184187
185-
188+ // Specialization (declaration) of DeleteObj for NamedObject class, so that
189+ // derived classes can rely on it
190+ template <>
191+ std::unique_ptr<NamedObject>
192+ NamedObjectVector::DeleteObj (const std::string &name);
186193
187194} // Namespace luxrays
188195
0 commit comments