fix build after MethodDeleter interface change

Change-Id: Iadb9e37772fd6588636085944c1455249ac0f926
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3457
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
X512 2020-12-04 22:54:37 +09:00 committed by Adrien Destugues
parent aecba91311
commit ab57ee42cb
5 changed files with 13 additions and 16 deletions

View File

@ -1190,7 +1190,7 @@ ext2_open(fs_volume* _volume, fs_vnode* _node, int openMode, void** _cookie)
cookie->last_size = inode->Size();
cookie->last_notification = system_time();
MethodDeleter<Inode, status_t> fileCacheEnabler(&Inode::EnableFileCache);
MethodDeleter<Inode, status_t, &Inode::EnableFileCache> fileCacheEnabler;
if ((openMode & O_NOCACHE) != 0) {
status = inode->DisableFileCache();
if (status != B_OK)

View File

@ -148,8 +148,8 @@ PackageFile::VFSInit(dev_t deviceID, ino_t nodeID)
status_t error = PackageNode::VFSInit(deviceID, nodeID);
if (error != B_OK)
return error;
MethodDeleter<PackageNode> baseClassUninit(this,
&PackageNode::NonVirtualVFSUninit);
MethodDeleter<PackageNode, void, &PackageNode::NonVirtualVFSUninit>
baseClassUninit(this);
// open the package -- that's already done by PackageNode::VFSInit(), so it
// shouldn't fail here. We only need to do it again, since we need the FD.

View File

@ -1955,8 +1955,7 @@ device_node::Probe(const char* devicePath, uint32 updateCycle)
if (status < B_OK)
return status;
MethodDeleter<device_node, bool> uninit(this,
&device_node::UninitDriver);
MethodDeleter<device_node, bool, &device_node::UninitDriver> uninit(this);
if ((fFlags & B_FIND_CHILD_ON_DEMAND) != 0) {
bool matches = false;
@ -2026,8 +2025,7 @@ device_node::Reprobe()
if (status < B_OK)
return status;
MethodDeleter<device_node, bool> uninit(this,
&device_node::UninitDriver);
MethodDeleter<device_node, bool, &device_node::UninitDriver> uninit(this);
// If this child has been probed already, probe it again
status = _Probe();
@ -2054,8 +2052,7 @@ device_node::Rescan()
if (status < B_OK)
return status;
MethodDeleter<device_node, bool> uninit(this,
&device_node::UninitDriver);
MethodDeleter<device_node, bool, &device_node::UninitDriver> uninit(this);
if (DriverModule()->rescan_child_devices != NULL) {
status = DriverModule()->rescan_child_devices(DriverData());

View File

@ -2537,7 +2537,7 @@ free_cached_page(vm_page *page, bool dontWait)
VMCache* cache = page->Cache();
AutoLocker<VMCache> cacheLocker(cache, true);
MethodDeleter<VMCache> _2(cache, &VMCache::ReleaseRefLocked);
MethodDeleter<VMCache, void, &VMCache::ReleaseRefLocked> _2(cache);
// check again if that page is still a candidate
if (page->busy || page->State() != PAGE_STATE_CACHED)

View File

@ -557,8 +557,8 @@ internal_path_for_path(char* referencePath, size_t referencePathSize,
// get the installation location
InstallationLocations* installationLocations = InstallationLocations::Get();
MethodDeleter<InstallationLocations> installationLocationsDeleter(
installationLocations, &InstallationLocations::Put);
MethodDeleter<InstallationLocations, void, &InstallationLocations::Put>
installationLocationsDeleter(installationLocations);
size_t installationLocationIndex;
const char* installationLocation = installationLocations->LocationFor(
@ -678,8 +678,8 @@ __find_paths_etc(const char* architecture, path_base_directory baseDirectory,
// get the installation locations
InstallationLocations* installationLocations = InstallationLocations::Get();
MethodDeleter<InstallationLocations> installationLocationsDeleter(
installationLocations, &InstallationLocations::Put);
MethodDeleter<InstallationLocations, void, &InstallationLocations::Put>
installationLocationsDeleter(installationLocations);
// Get the relative paths and compute the total size to allocate.
const char* relativePaths[InstallationLocations::kCount];
@ -756,8 +756,8 @@ __guess_secondary_architecture_from_path(const char* path,
// get an installation location relative path
InstallationLocations* installationLocations = InstallationLocations::Get();
MethodDeleter<InstallationLocations> installationLocationsDeleter(
installationLocations, &InstallationLocations::Put);
MethodDeleter<InstallationLocations, void, &InstallationLocations::Put>
installationLocationsDeleter(installationLocations);
size_t installationLocationIndex;
const char* installationLocation = installationLocations->LocationFor(