From c62993e9e188098013343109acf53d614a2b8402 Mon Sep 17 00:00:00 2001 From: Daniel Mierswa Date: Mon, 27 Feb 2012 12:59:48 +0100 Subject: use std::make_shared where shared_ptr instances are required removes compilation errors with 4.7 because construction of shared_ptr instances is explicit and matches the convention used in the rest of the code --- paludis/ndbam.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paludis/ndbam.cc b/paludis/ndbam.cc index c68478654..7003ce89c 100644 --- a/paludis/ndbam.cc +++ b/paludis/ndbam.cc @@ -261,7 +261,7 @@ NDBAM::has_package_named(const QualifiedPackageName & q) if (FSPath(_imp->location / "indices" / "categories" / stringify(q.category()) / stringify(q.package())).stat().is_directory_or_symlink_to_directory()) { - cc.package_contents_map.insert(std::make_pair(q, new PackageContents)); + cc.package_contents_map.insert(std::make_pair(q, std::make_shared())); return true; } cc.package_contents_map.insert(std::make_pair(q, std::shared_ptr())); @@ -596,7 +596,7 @@ NDBAM::category_names_containing_package(const PackageNamePart & p) const Lock l(_imp->category_names_containing_package_mutex); CategoryNamesContainingPackage::iterator cncp_i(_imp->category_names_containing_package.find(p)); if (_imp->category_names_containing_package.end() == cncp_i) - cncp_i = _imp->category_names_containing_package.insert(std::make_pair(p, new CategoryNamesContainingPackageEntry)).first; + cncp_i = _imp->category_names_containing_package.insert(std::make_pair(p, std::make_shared())).first; CategoryNamesContainingPackageEntry & cncp(*cncp_i->second); l.acquire_then_release_old(cncp.mutex); -- cgit v1.2.3