1
0
Fork 0

Fix effc++ warnings in drives.cpp

This commit is contained in:
Patryk Obara 2019-12-31 21:45:26 +01:00 committed by Patryk Obara
parent 8da42c5983
commit 2694aca2b2
3 changed files with 9 additions and 12 deletions

View file

@ -268,7 +268,8 @@ public:
virtual bool isRemovable(void)=0;
virtual Bits UnMount(void)=0;
char * GetInfo(void);
const char * GetInfo() const { return info; }
char curdir[DOS_PATHLENGTH];
char info[256];
/* Can be overridden for example in iso images */

View file

@ -103,15 +103,11 @@ void Set_Label(char const * const input, char * const output, bool cdrom) {
output[labelPos-1] = 0;
}
DOS_Drive::DOS_Drive() {
curdir[0]=0;
info[0]=0;
}
char * DOS_Drive::GetInfo(void) {
return info;
DOS_Drive::DOS_Drive()
: dirCache()
{
curdir[0] = '\0';
info[0] = '\0';
}
// static members variables

View file

@ -44,8 +44,8 @@ public:
private:
static struct DriveInfo {
std::vector<DOS_Drive*> disks;
Bit32u currentDisk;
std::vector<DOS_Drive*> disks = {};
int currentDisk = 0;
} driveInfos[DOS_DRIVES];
static int currentDrive;