# # patch "ChangeLog" # from [87d013ff3ceb49047e93e0a8872d961d7f4db80d] # to [cb62fb2b727ae1a2111a72d45e04792ba87b2206] # # patch "commands.cc" # from [4f0bdd287f9a5e2a34d7bd96b404107c27286f6a] # to [3422c17052cff82596bd7f0e601cd3187cab1083] # # patch "work.cc" # from [17e65acebf5d9a6799035eaba19681967571a8ef] # to [e074b3b877e2c4e9fa03ce243d8a51ca8605a4ad] # # patch "work.hh" # from [7d962298e1f4f0e65ec9b058caeb0f1db5b881fd] # to [88af9184d605b4c3c59fb45c7c54806cc4afd6e2] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,9 @@ +2005-04-29 Derek Scherger + + * commands.cc (struct file_itemizer): move to ... + * work.hh (file_itemizer} ... here + * work.cc (file_itemizer::visit_file} ... and here + 2005-04-29 Emile Snyder * annotate.cc (do_annotate_node): Stop doing expensive --- commands.cc +++ commands.cc @@ -1814,26 +1814,6 @@ } } -struct file_itemizer : public tree_walker -{ - app_state & app; - path_set & known; - path_set & unknown; - path_set & ignored; - file_itemizer(app_state & a, path_set & k, path_set & u, path_set & i) - : app(a), known(k), unknown(u), ignored(i) {} - virtual void visit_file(file_path const & path) - { - if (app.restriction_includes(path) && known.find(path) == known.end()) - { - if (app.lua.hook_ignore_file(path)) - ignored.insert(path); - else - unknown.insert(path); - } - } -}; - static void ls_unknown (app_state & app, bool want_ignored, vector const & args) { --- work.cc +++ work.cc @@ -19,6 +19,18 @@ using namespace boost; using namespace std; +void +file_itemizer::visit_file(file_path const & path) +{ + if (app.restriction_includes(path) && known.find(path) == known.end()) + { + if (app.lua.hook_ignore_file(path)) + ignored.insert(path); + else + unknown.insert(path); + } +} + class addition_builder : public tree_walker --- work.hh +++ work.hh @@ -46,6 +46,17 @@ typedef std::set path_set; +struct file_itemizer : public tree_walker +{ + app_state & app; + path_set & known; + path_set & unknown; + path_set & ignored; + file_itemizer(app_state & a, path_set & k, path_set & u, path_set & i) + : app(a), known(k), unknown(u), ignored(i) {} + virtual void file_itemizer::visit_file(file_path const & path); +}; + void build_additions(std::vector const & args, manifest_map const & m_old,