diff options
-rw-r--r-- | recording.c | 12 | ||||
-rw-r--r-- | visibility.c | 22 | ||||
-rw-r--r-- | visibility.h | 8 |
3 files changed, 0 insertions, 42 deletions
diff --git a/recording.c b/recording.c index 4cb5f7d..d318549 100644 --- a/recording.c +++ b/recording.c @@ -121,10 +121,6 @@ void cDuplicateRecordingScannerThread::Scan(void) { gettimeofday(&startTime, NULL); cStateKey duplicateRecordingsStateKey; DuplicateRecordings.Lock(duplicateRecordingsStateKey, true); -#ifdef DEBUG_VISIBILITY - cVisibility::ClearCounters(); - int isDuplicateCount = 0; -#endif cDuplicateRecording *descriptionless = new cDuplicateRecording(); cList<cDuplicateRecording> recordings; DuplicateRecordings.Clear(); @@ -151,9 +147,6 @@ void cDuplicateRecordingScannerThread::Scan(void) { duplicates->Duplicates()->Add(new cDuplicateRecording(*recording)); for (cDuplicateRecording *compare = recordings.First(); compare; compare = recordings.Next(compare)) { if (!compare->Checked()) { -#ifdef DEBUG_VISIBILITY - isDuplicateCount++; -#endif if (recording->IsDuplicate(compare)) { duplicates->Duplicates()->Add(new cDuplicateRecording(*compare)); compare->SetChecked(); @@ -175,12 +168,7 @@ void cDuplicateRecordingScannerThread::Scan(void) { duplicateRecordingsStateKey.Remove(); gettimeofday(&stopTime, NULL); double seconds = (((long long)stopTime.tv_sec * 1000000 + stopTime.tv_usec) - ((long long)startTime.tv_sec * 1000000 + startTime.tv_usec)) / 1000000.0; -#ifdef DEBUG_VISIBILITY - dsyslog("duplicates: Scanning of duplicates took %.2f seconds, is duplicate count %d, get count %d, read count %d, access count %d.", - seconds, isDuplicateCount, cVisibility::getCount, cVisibility::readCount, cVisibility::accessCount); -#else dsyslog("duplicates: Scanning of duplicates took %.2f seconds.", seconds); -#endif } cDuplicateRecordingScannerThread DuplicateRecordingScanner; diff --git a/visibility.c b/visibility.c index 35bdd97..1213f89 100644 --- a/visibility.c +++ b/visibility.c @@ -10,12 +10,6 @@ // --- cVisibility ----------------------------------------------------------- -#ifdef DEBUG_VISIBILITY -int cVisibility::getCount = 0; -int cVisibility::readCount = 0; -int cVisibility::accessCount = 0; -#endif - cVisibility::cVisibility(const char *fileName) { hiddenFileName = AddDirectory(fileName, "duplicates.hidden"); visibility = UNKNOWN; @@ -26,9 +20,6 @@ cVisibility::cVisibility(const cVisibility &Visibility) : visibility(Visibility.visibility) {} eVisibility cVisibility::Get(void) { -#ifdef DEBUG_VISIBILITY - getCount++; -#endif return visibility; } @@ -37,13 +28,7 @@ void cVisibility::Set(bool visible) { } eVisibility cVisibility::Read(void) { -#ifdef DEBUG_VISIBILITY - readCount++; -#endif if (visibility == UNKNOWN) { -#ifdef DEBUG_VISIBILITY - accessCount++; -#endif visibility = access(hiddenFileName, F_OK) == 0 ? HIDDEN : VISIBLE; } return visibility; @@ -66,10 +51,3 @@ bool cVisibility::Write(bool visible) { return false; } -#ifdef DEBUG_VISIBILITY -void cVisibility::ClearCounters(void) { - getCount = 0; - readCount = 0; - accessCount = 0; -} -#endif diff --git a/visibility.h b/visibility.h index dd29bf6..60d8b1d 100644 --- a/visibility.h +++ b/visibility.h @@ -9,8 +9,6 @@ #ifndef _DUPLICATES_VISIBILITY_H #define _DUPLICATES_VISIBILITY_H -//#define DEBUG_VISIBILITY - #include <vdr/recording.h> // --- eVisibility ----------------------------------------------------------- @@ -30,12 +28,6 @@ public: void Set(bool visible); eVisibility Read(void); bool Write(bool visible); -#ifdef DEBUG_VISIBILITY - static int getCount; - static int readCount; - static int accessCount; - static void ClearCounters(void); -#endif }; #endif |