mirror of
https://github.com/ksherlock/profuse.git
synced 2026-09-24 23:56:21 +00:00
shared_ptr changes.
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@346 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
@@ -75,10 +75,10 @@ uint32_t DiskCopy42Image::Checksum(void *data, size_t size)
|
||||
return rv;
|
||||
}
|
||||
|
||||
DiskCopy42Image *DiskCopy42Image::Open(MappedFile *f)
|
||||
BlockDevicePointer DiskCopy42Image::Open(MappedFile *f)
|
||||
{
|
||||
Validate(f);
|
||||
return new DiskCopy42Image(f);
|
||||
return BlockDevicePointer(new DiskCopy42Image(f));
|
||||
}
|
||||
|
||||
static uint8_t DiskFormat(size_t blocks)
|
||||
@@ -101,12 +101,12 @@ static uint8_t FormatByte(size_t blocks)
|
||||
default: return 0x22;
|
||||
}
|
||||
}
|
||||
DiskCopy42Image *DiskCopy42Image::Create(const char *name, size_t blocks)
|
||||
BlockDevicePointer DiskCopy42Image::Create(const char *name, size_t blocks)
|
||||
{
|
||||
return Create(name, blocks, "Untitled");
|
||||
}
|
||||
|
||||
DiskCopy42Image *DiskCopy42Image::Create(const char *name, size_t blocks, const char *vname)
|
||||
BlockDevicePointer DiskCopy42Image::Create(const char *name, size_t blocks, const char *vname)
|
||||
{
|
||||
MappedFile *file = MappedFile::Create(name, blocks * 512 + oUserData);
|
||||
|
||||
@@ -163,7 +163,7 @@ DiskCopy42Image *DiskCopy42Image::Create(const char *name, size_t blocks, const
|
||||
std::memcpy(file->address(), header.buffer(), oUserData);
|
||||
file->sync();
|
||||
|
||||
return new DiskCopy42Image(file);
|
||||
return BlockDevicePointer(new DiskCopy42Image(file));
|
||||
}
|
||||
|
||||
void DiskCopy42Image::Validate(MappedFile *file)
|
||||
|
||||
Reference in New Issue
Block a user