From 93a741fc6f4493f663b9a53498c3b830fd364de1 Mon Sep 17 00:00:00 2001 From: localhorst Date: Wed, 16 Sep 2020 15:27:25 +0200 Subject: [PATCH] code cleanup --- include/reHDD.h | 4 ++-- src/reHDD.cpp | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/reHDD.h b/include/reHDD.h index 721c6bc..c5b8532 100644 --- a/include/reHDD.h +++ b/include/reHDD.h @@ -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 diff --git a/src/reHDD.cpp b/src/reHDD.cpp index 42b5390..67995da 100644 --- a/src/reHDD.cpp +++ b/src/reHDD.cpp @@ -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::iterator it = listDrives.begin(); advance(it, u8SelectedEntry); - return &(*it); + return &(*it); } else { @@ -266,10 +265,7 @@ void reHDD::filterNewDrives(list * plistOldDrives, list * 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();