Filter
- rc.debug=1 propagates to Eval::debug. - Corrected comments.
This commit is contained in:
@@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
extern Context context;
|
extern Context context;
|
||||||
|
|
||||||
|
// TODO Tie this to rc.abbreviation.minimum.
|
||||||
static const int minimumMatchLength = 3;
|
static const int minimumMatchLength = 3;
|
||||||
|
|
||||||
// Alias expansion limit. Any more indicates some kind of error.
|
// Alias expansion limit. Any more indicates some kind of error.
|
||||||
@@ -159,7 +160,7 @@ void A3t::entity (const std::string& name, const std::string& value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Search for 'value' in _entities, return category and canonicalized value.
|
// Search for 'value' in _entities category, return canonicalized value.
|
||||||
bool A3t::canonicalize (
|
bool A3t::canonicalize (
|
||||||
std::string& canonicalized,
|
std::string& canonicalized,
|
||||||
const std::string& category,
|
const std::string& category,
|
||||||
|
|||||||
@@ -92,6 +92,9 @@ void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output
|
|||||||
eval.addSource (domSource);
|
eval.addSource (domSource);
|
||||||
eval.compileExpression (filterExpr);
|
eval.compileExpression (filterExpr);
|
||||||
|
|
||||||
|
if (context.config.getBoolean ("debug"))
|
||||||
|
eval.debug ();
|
||||||
|
|
||||||
std::vector <Task>::const_iterator task;
|
std::vector <Task>::const_iterator task;
|
||||||
for (task = input.begin (); task != input.end (); ++task)
|
for (task = input.begin (); task != input.end (); ++task)
|
||||||
{
|
{
|
||||||
@@ -144,6 +147,9 @@ void Filter::subset (std::vector <Task>& output)
|
|||||||
eval.addSource (domSource);
|
eval.addSource (domSource);
|
||||||
eval.compileExpression (filterExpr);
|
eval.compileExpression (filterExpr);
|
||||||
|
|
||||||
|
if (context.config.getBoolean ("debug"))
|
||||||
|
eval.debug ();
|
||||||
|
|
||||||
output.clear ();
|
output.clear ();
|
||||||
std::vector <Task>::const_iterator task;
|
std::vector <Task>::const_iterator task;
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ int CmdCount::execute (std::string& output)
|
|||||||
{
|
{
|
||||||
// Apply filter.
|
// Apply filter.
|
||||||
handleRecurrence ();
|
handleRecurrence ();
|
||||||
std::vector <Task> filtered;
|
|
||||||
Filter filter;
|
Filter filter;
|
||||||
|
std::vector <Task> filtered;
|
||||||
filter.subset (filtered);
|
filter.subset (filtered);
|
||||||
context.tdb2.commit ();
|
context.tdb2.commit ();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user