1
0
Fork 0

Fix effc++ warnings in ems.cpp

This commit is contained in:
Patryk Obara 2020-04-06 11:38:24 +02:00 committed by Patryk Obara
parent 278d699128
commit a6792a44ad

View file

@ -99,11 +99,12 @@ static Bit16u GEMMIS_seg;
class device_EMM : public DOS_Device {
public:
device_EMM(bool is_emm386_avail) {
is_emm386=is_emm386_avail;
device_EMM(bool is_emm386_avail) : is_emm386(is_emm386_avail)
{
SetName("EMMXXXX0");
GEMMIS_seg=0;
GEMMIS_seg = 0;
}
bool Read(Bit8u * /*data*/,Bit16u * /*size*/) { return false;}
bool Write(Bit8u * /*data*/,Bit16u * /*size*/){
LOG(LOG_IOCTL,LOG_NORMAL)("EMS:Write to device");
@ -1299,20 +1300,27 @@ Bitu GetEMSType(Section_prop * section) {
return rtype;
}
class EMS: public Module_base {
class EMS : public Module_base {
private:
DOS_Device * emm_device;
DOS_Device *emm_device = nullptr;
/* location in protected unfreeable memory where the ems name and callback are
* stored 32 bytes.*/
static Bit16u ems_baseseg;
RealPt old67_pointer;
CALLBACK_HandlerObject call_vdma,call_vcpi,call_v86mon;
Bitu call_int67;
RealPt old67_pointer = 0;
CALLBACK_HandlerObject call_vdma;
CALLBACK_HandlerObject call_vcpi;
CALLBACK_HandlerObject call_v86mon;
Bitu call_int67 = 0;
public:
EMS(Section* configuration):Module_base(configuration) {
emm_device=NULL;
EMS(Section *configuration)
: Module_base(configuration),
call_vdma(),
call_vcpi(),
call_v86mon()
{
ems_type=0;
/* Virtual DMA interrupt callback */
@ -1336,8 +1344,9 @@ public:
if (!ems_baseseg) ems_baseseg=DOS_GetMemory(2); //We have 32 bytes
/* Add a little hack so it appears that there is an actual ems device installed */
char const* emsname="EMMXXXX0";
MEM_BlockWrite(PhysMake(ems_baseseg,0xa),emsname,(Bitu)(strlen(emsname)+1));
char const *emsname = "EMMXXXX0";
MEM_BlockWrite(PhysMake(ems_baseseg, 0xa), emsname,
strlen(emsname) + 1);
call_int67=CALLBACK_Allocate();
CALLBACK_Setup(call_int67,&INT67_Handler,CB_IRET,PhysMake(ems_baseseg,4),"Int 67 ems");
@ -1416,6 +1425,9 @@ public:
}
}
EMS(const EMS &) = delete; // prevent copying
EMS &operator=(const EMS &) = delete; // prevent assignment
~EMS() {
if (ems_type<=0) return;