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:
ksherlock
2011-02-26 03:52:54 +00:00
parent 89e80dcc10
commit 9746117f71
16 changed files with 96 additions and 37 deletions
+7 -3
View File
@@ -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();