update Device with shared_ptr macros

git-svn-id: https://profuse.googlecode.com/svn/branches/profuse_interim@369 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
ksherlock
2011-02-28 05:04:30 +00:00
parent c7c4f13bf7
commit ac8bbd5265
14 changed files with 67 additions and 50 deletions

View File

@@ -78,7 +78,7 @@ unsigned BlockDevice::ImageType(const char *type, unsigned defv)
return defv;
}
BlockDevice *BlockDevice::Open(const char *name, File::FileFlags flags, unsigned imageType)
BlockDevicePointer BlockDevice::Open(const char *name, File::FileFlags flags, unsigned imageType)
{
#undef __METHOD__
#define __METHOD__ "BlockDevice::Open"
@@ -128,7 +128,7 @@ BlockDevice *BlockDevice::Open(const char *name, File::FileFlags flags, unsigned
}
// throw an error?
return NULL;
return BlockDevicePointer();
}
@@ -158,7 +158,7 @@ static std::string filename(const std::string& src)
}
BlockDevice *BlockDevice::Create(const char *fname, const char *vname, unsigned blocks, unsigned imageType)
BlockDevicePointer BlockDevice::Create(const char *fname, const char *vname, unsigned blocks, unsigned imageType)
{
std::string xname;
@@ -191,7 +191,7 @@ BlockDevice *BlockDevice::Create(const char *fname, const char *vname, unsigned
return DavexDiskImage::Create(fname, blocks, vname);
}
return NULL;
return BlockDevicePointer();
}