mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-11 09:29:53 +00:00
Removed obsolete assertions
This commit is contained in:
parent
7fae0c0c5c
commit
37928ba786
@ -40,7 +40,7 @@ Disk::Disk(const std::string id) : Device(id), PrimaryDevice(), BlockDevice()
|
||||
{
|
||||
// Work initialization
|
||||
configured_sector_size = 0;
|
||||
disk.size = 0;
|
||||
disk.size = 9;
|
||||
disk.blocks = 0;
|
||||
disk.dcache = NULL;
|
||||
disk.imgoffset = 0;
|
||||
@ -138,7 +138,6 @@ bool Disk::Dispatch(SCSIDEV *controller)
|
||||
//---------------------------------------------------------------------------
|
||||
void Disk::Open(const Filepath& path)
|
||||
{
|
||||
ASSERT((disk.size >= 8) && (disk.size <= 12));
|
||||
ASSERT(disk.blocks > 0);
|
||||
|
||||
SetReady(true);
|
||||
|
@ -74,7 +74,6 @@ DiskTrack::~DiskTrack()
|
||||
void DiskTrack::Init(int track, int size, int sectors, BOOL raw, off_t imgoff)
|
||||
{
|
||||
ASSERT(track >= 0);
|
||||
ASSERT((size >= 8) && (size <= 12));
|
||||
ASSERT((sectors > 0) && (sectors <= 0x100));
|
||||
ASSERT(imgoff >= 0);
|
||||
|
||||
@ -129,7 +128,6 @@ BOOL DiskTrack::Load(const Filepath& path)
|
||||
int length = dt.sectors << dt.size;
|
||||
|
||||
// Allocate buffer memory
|
||||
ASSERT((dt.size >= 8) && (dt.size <= 12));
|
||||
ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100));
|
||||
|
||||
if (dt.buffer == NULL) {
|
||||
@ -237,7 +235,6 @@ BOOL DiskTrack::Save(const Filepath& path)
|
||||
// Need to write
|
||||
ASSERT(dt.buffer);
|
||||
ASSERT(dt.changemap);
|
||||
ASSERT((dt.size >= 8) && (dt.size <= 12));
|
||||
ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100));
|
||||
|
||||
// Writing in RAW mode is not allowed
|
||||
@ -329,7 +326,6 @@ BOOL DiskTrack::Read(BYTE *buf, int sec) const
|
||||
|
||||
// Copy
|
||||
ASSERT(dt.buffer);
|
||||
ASSERT((dt.size >= 8) && (dt.size <= 12));
|
||||
ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100));
|
||||
memcpy(buf, &dt.buffer[(off_t)sec << dt.size], (off_t)1 << dt.size);
|
||||
|
||||
@ -364,7 +360,6 @@ BOOL DiskTrack::Write(const BYTE *buf, int sec)
|
||||
|
||||
// Compare
|
||||
ASSERT(dt.buffer);
|
||||
ASSERT((dt.size >= 8) && (dt.size <= 12));
|
||||
ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100));
|
||||
if (memcmp(buf, &dt.buffer[offset], length) == 0) {
|
||||
// 同じものを書き込もうとしているので、正常終了
|
||||
@ -393,7 +388,6 @@ BOOL DiskTrack::Write(const BYTE *buf, int sec)
|
||||
//---------------------------------------------------------------------------
|
||||
DiskCache::DiskCache(const Filepath& path, int size, int blocks, off_t imgoff)
|
||||
{
|
||||
ASSERT((size >= 8) && (size <= 12));
|
||||
ASSERT(blocks > 0);
|
||||
ASSERT(imgoff >= 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user