From 299cda2283736d9ba1f378e200f3a62488e98ef9 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 31 Oct 2014 20:01:56 -0400 Subject: [PATCH] CLI - Added debug.parser=3 support to ::findAttributes. --- src/CLI.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/CLI.cpp b/src/CLI.cpp index 224f2134f..3b01bbc9a 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -1525,11 +1525,20 @@ void CLI::findAttributes () options.push_back (e->second); // Walk the arguments and tag as OP. + bool changes = false; std::vector ::iterator a; for (a = _args.begin (); a != _args.end (); ++a) if (a->hasTag ("FILTER")) if (std::find (options.begin (), options.end (), a->attribute ("raw")) != options.end ()) - a->tag ("ATTRIBUTE"); + if (! a->hasTag ("ATTRIBUTE")) + { + a->tag ("ATTRIBUTE"); + changes = true; + } + + if (changes && + context.config.getInteger ("debug.parser") >= 3) + context.debug (context.cli.dump ("CLI::analyze findAttributes")); } ////////////////////////////////////////////////////////////////////////////////