From 5cee038743e1e149226d5b0b1a68a782182a4e33 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 24 Dec 2018 23:05:35 +0300 Subject: Add filter to Build Configurations page --- mod/build-config-module.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'mod/build-config-module.cxx') diff --git a/mod/build-config-module.cxx b/mod/build-config-module.cxx index 57c035f..b6b5072 100644 --- a/mod/build-config-module.cxx +++ b/mod/build-config-module.cxx @@ -335,6 +335,32 @@ namespace brep return false; } + bool build_config_module:: + belongs (const bbot::build_config& cfg, const char* cls) const + { + const map& im (build_conf_->class_inheritance_map); + + for (const string& c: cfg.classes) + { + if (c == cls) + return true; + + // Go through base classes. + // + for (auto i (im.find (c)); i != im.end (); ) + { + const string& base (i->second); + + if (base == cls) + return true; + + i = im.find (base); + } + } + + return false; + } + path build_config_module:: dash_components_to_path (const string& s) { -- cgit v1.1