From 7961ca136f9fa535316a478cc7739e0ff4b501b4 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 3 Apr 2011 19:44:58 -0400 Subject: [PATCH] Code Cleanup - Removed FEATURE_TDB_OPT conditional compilation. --- src/TDB.cpp | 6 ------ src/main.h | 1 - 2 files changed, 7 deletions(-) diff --git a/src/TDB.cpp b/src/TDB.cpp index 9481309a5..748b3e7bd 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -244,7 +244,6 @@ void TDB::unlock () // multiple files. int TDB::load (std::vector & tasks, Filter& filter) { -#ifdef FEATURE_TDB_OPT // Special optimization: if the filter contains Att ('status', '', 'pending'), // and no other 'status' filters, then loadCompleted can be skipped. int numberStatusClauses = 0; @@ -261,19 +260,14 @@ int TDB::load (std::vector & tasks, Filter& filter) ++numberSimpleStatusClauses; } } -#endif loadPending (tasks, filter); -#ifdef FEATURE_TDB_OPT if (numberStatusClauses == 0 || numberStatusClauses != numberSimpleStatusClauses) loadCompleted (tasks, filter); else context.debug ("load optimization short circuit"); -#else - loadCompleted (tasks, filter); -#endif return tasks.size (); } diff --git a/src/main.h b/src/main.h index 549b6f3e3..58b05deef 100644 --- a/src/main.h +++ b/src/main.h @@ -27,7 +27,6 @@ #ifndef INCLUDED_MAIN #define INCLUDED_MAIN -#define FEATURE_TDB_OPT 1 // TDB Optimization reduces file I/O. #define FEATURE_NEW_ID 1 // Echoes back new id. //#define FEATURE_REGEX 1 // Enables regexes for attribute modifiers, // // subst, general search.