fix/list change vector to list #24

Merged
localhorst merged 4 commits from fix/list into master 2020-09-16 15:28:51 +02:00
2 changed files with 3 additions and 7 deletions
Showing only changes of commit 93a741fc6f - Show all commits

View File

@ -8,9 +8,9 @@
#ifndef REHDD_H_
#define REHDD_H_
#define REHDD_VERSION "bV0.1.0"
#define REHDD_VERSION "bV0.1.1"
#define DRYRUN
//#define DRYRUN
// Drive handling Settings
#define WORSE_HOURS 19200 //mark drive if at this limit or beyond

View File

@ -66,7 +66,6 @@ void reHDD::app_logic(void)
read (fdNewDrivesInformPipe[0],&dummy,1);
filterNewDrives(&listDrives, &listNewDrives); //filter and copy to app logic vector
printDrives(&listDrives);
}
if (FD_ISSET(fdShredInformPipe[0], &selectSet))
@ -88,7 +87,7 @@ Drive* reHDD::getSelectedDrive()
{
list<Drive>::iterator it = listDrives.begin();
advance(it, u8SelectedEntry);
return &(*it);
return &(*it);
}
else
{
@ -266,10 +265,7 @@ void reHDD::filterNewDrives(list <Drive>* plistOldDrives, list <Drive>* plistNew
//add new drives to drive list
for (itNew = plistNewDrives->begin(); itNew != plistNewDrives->end(); ++itNew)
{
//plistOldDrives->push_back(plistNewDrives->at(itNew - plistNewDrives->begin()));
plistOldDrives->push_back(*itNew);
Logger::logThis()->info("Add new drive: " + itNew->getModelName());
}
plistNewDrives->clear();