Removed obsolete assertions

This commit is contained in:
Uwe Seimet 2021-08-25 21:27:55 +02:00
parent 7fae0c0c5c
commit 37928ba786
2 changed files with 1 additions and 8 deletions

View File

@ -40,7 +40,7 @@ Disk::Disk(const std::string id) : Device(id), PrimaryDevice(), BlockDevice()
{ {
// Work initialization // Work initialization
configured_sector_size = 0; configured_sector_size = 0;
disk.size = 0; disk.size = 9;
disk.blocks = 0; disk.blocks = 0;
disk.dcache = NULL; disk.dcache = NULL;
disk.imgoffset = 0; disk.imgoffset = 0;
@ -138,7 +138,6 @@ bool Disk::Dispatch(SCSIDEV *controller)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void Disk::Open(const Filepath& path) void Disk::Open(const Filepath& path)
{ {
ASSERT((disk.size >= 8) && (disk.size <= 12));
ASSERT(disk.blocks > 0); ASSERT(disk.blocks > 0);
SetReady(true); SetReady(true);

View File

@ -74,7 +74,6 @@ DiskTrack::~DiskTrack()
void DiskTrack::Init(int track, int size, int sectors, BOOL raw, off_t imgoff) void DiskTrack::Init(int track, int size, int sectors, BOOL raw, off_t imgoff)
{ {
ASSERT(track >= 0); ASSERT(track >= 0);
ASSERT((size >= 8) && (size <= 12));
ASSERT((sectors > 0) && (sectors <= 0x100)); ASSERT((sectors > 0) && (sectors <= 0x100));
ASSERT(imgoff >= 0); ASSERT(imgoff >= 0);
@ -129,7 +128,6 @@ BOOL DiskTrack::Load(const Filepath& path)
int length = dt.sectors << dt.size; int length = dt.sectors << dt.size;
// Allocate buffer memory // Allocate buffer memory
ASSERT((dt.size >= 8) && (dt.size <= 12));
ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100)); ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100));
if (dt.buffer == NULL) { if (dt.buffer == NULL) {
@ -237,7 +235,6 @@ BOOL DiskTrack::Save(const Filepath& path)
// Need to write // Need to write
ASSERT(dt.buffer); ASSERT(dt.buffer);
ASSERT(dt.changemap); ASSERT(dt.changemap);
ASSERT((dt.size >= 8) && (dt.size <= 12));
ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100)); ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100));
// Writing in RAW mode is not allowed // Writing in RAW mode is not allowed
@ -329,7 +326,6 @@ BOOL DiskTrack::Read(BYTE *buf, int sec) const
// Copy // Copy
ASSERT(dt.buffer); ASSERT(dt.buffer);
ASSERT((dt.size >= 8) && (dt.size <= 12));
ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100)); ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100));
memcpy(buf, &dt.buffer[(off_t)sec << dt.size], (off_t)1 << dt.size); 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 // Compare
ASSERT(dt.buffer); ASSERT(dt.buffer);
ASSERT((dt.size >= 8) && (dt.size <= 12));
ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100)); ASSERT((dt.sectors > 0) && (dt.sectors <= 0x100));
if (memcmp(buf, &dt.buffer[offset], length) == 0) { 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) DiskCache::DiskCache(const Filepath& path, int size, int blocks, off_t imgoff)
{ {
ASSERT((size >= 8) && (size <= 12));
ASSERT(blocks > 0); ASSERT(blocks > 0);
ASSERT(imgoff >= 0); ASSERT(imgoff >= 0);