fix/list change vector to list #24
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user