Use enum value as array index.
This commit is contained in:
parent
47f09067ea
commit
5dd90e9597
@ -4387,7 +4387,7 @@ bool hwapi::dcDownloadRequest(QString const &dcFileToDownload) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fNameBuffer = data->m_downLoadDC.m_filename;
|
char *fNameBuffer = data->m_downLoadDC.m_filename[(int)SharedMem::DCDownload::FILE_INDEX::DC_BINARY];
|
||||||
size_t const size = sizeof(data->m_downLoadDC.m_filename);
|
size_t const size = sizeof(data->m_downLoadDC.m_filename);
|
||||||
|
|
||||||
std::memset(fNameBuffer, 0x00, size);
|
std::memset(fNameBuffer, 0x00, size);
|
||||||
@ -4575,7 +4575,7 @@ bool hwapi::dcDownloadReportFinished() {
|
|||||||
|
|
||||||
QString hwapi::dcDownloadFileName() const {
|
QString hwapi::dcDownloadFileName() const {
|
||||||
SharedMem const *data = SharedMem::getDataConst();
|
SharedMem const *data = SharedMem::getDataConst();
|
||||||
return data ? data->m_downLoadDC.m_filename : "";
|
return data ? data->m_downLoadDC.m_filename[(int)SharedMem::DCDownload::FILE_INDEX::DC_BINARY] : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hwapi::dcDownloadSetRequested(bool requested) {
|
bool hwapi::dcDownloadSetRequested(bool requested) {
|
||||||
|
Loading…
Reference in New Issue
Block a user