diff --git a/python/templates/Collection.h.jinja2 b/python/templates/Collection.h.jinja2 index e10352e40..dd28da4ed 100644 --- a/python/templates/Collection.h.jinja2 +++ b/python/templates/Collection.h.jinja2 @@ -74,6 +74,7 @@ public: void print(std::ostream& os=std::cout, bool flush=true) const final; /// operator to allow pointer like calling of members a la LCIO + [[deprecated("Use of operator->() is deprecated. Use . instead.")]] {{ class.bare_type }}Collection* operator->() { return static_cast<{{ class.bare_type }}Collection*>(this); } /// Append a new object to the collection, and return this object. diff --git a/tests/unittests/frame.cpp b/tests/unittests/frame.cpp index dc02d5de7..39517f1f5 100644 --- a/tests/unittests/frame.cpp +++ b/tests/unittests/frame.cpp @@ -398,10 +398,10 @@ TEST_CASE("Frame destructor ASanFail") { auto& hitClusters = hitClusterMap[name]; for (int i = 0; i < 3; ++i) { - auto cluster = hitClusters.first->create(); + auto cluster = hitClusters.first.create(); for (int j = 0; j < 5; ++j) { - auto hit = hitClusters.second->create(); + auto hit = hitClusters.second.create(); cluster.addHits(hit); } }