mirror of
https://github.com/ksherlock/profuse.git
synced 2026-04-20 14:16:37 +00:00
use smart macros to make the future easier
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@351 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
@@ -64,15 +64,19 @@ unsigned VolumeEntry::ValidName(const char *cp)
|
||||
|
||||
VolumeEntryPointer VolumeEntry::Open(Device::BlockDevicePointer device)
|
||||
{
|
||||
VolumeEntryPointer ptr(new VolumeEntry(device));
|
||||
|
||||
VolumeEntryPointer ptr;
|
||||
|
||||
//ptr = new VolumeEntry(device));
|
||||
ptr = MAKE_SHARED(VolumeEntry, device);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
VolumeEntryPointer VolumeEntry::Create(Device::BlockDevicePointer device, const char *name)
|
||||
{
|
||||
VolumeEntryPointer ptr(new VolumeEntry(device, name));
|
||||
VolumeEntryPointer ptr;
|
||||
|
||||
//ptr = new VolumeEntry(device, name);
|
||||
ptr = MAKE_SHARED(VolumeEntry, device, name);
|
||||
|
||||
// set up the weak references from the file entry to this.
|
||||
if (ptr) ptr->setParents();
|
||||
|
||||
Reference in New Issue
Block a user