Codechange: Make FiosItem's name and title std::string
This commit is contained in:
@@ -76,11 +76,12 @@ void FiosGetDrives(FileList &file_list)
|
||||
fios->type = FIOS_TYPE_DRIVE;
|
||||
fios->mtime = 0;
|
||||
#ifndef __INNOTEK_LIBC__
|
||||
snprintf(fios->name, lengthof(fios->name), "%c:", 'A' + disk - 1);
|
||||
fios->name += 'A' + disk - 1;
|
||||
#else
|
||||
snprintf(fios->name, lengthof(fios->name), "%c:", disk);
|
||||
fios->name += (char)disk;
|
||||
#endif
|
||||
strecpy(fios->title, fios->name, lastof(fios->title));
|
||||
fios->name += ':';
|
||||
fios->title = fios->name;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -185,8 +185,9 @@ void FiosGetDrives(FileList &file_list)
|
||||
FiosItem *fios = &file_list.emplace_back();
|
||||
fios->type = FIOS_TYPE_DRIVE;
|
||||
fios->mtime = 0;
|
||||
seprintf(fios->name, lastof(fios->name), "%c:", s[0] & 0xFF);
|
||||
strecpy(fios->title, fios->name, lastof(fios->title));
|
||||
fios->name += (char)(s[0] & 0xFF);
|
||||
fios->name += ':';
|
||||
fios->title = fios->name;
|
||||
while (*s++ != '\0') { /* Nothing */ }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user