]> git.tdb.fi Git - builder.git/commitdiff
Rename some variables to avoid conflicts with C++20 keywords
authorMikko Rasa <tdb@tdb.fi>
Sat, 7 Jan 2023 13:12:53 +0000 (15:12 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 7 Jan 2023 13:12:53 +0000 (15:12 +0200)
source/cli/buildercli.cpp
source/lib/component.cpp
source/lib/component.h
source/lib/package.cpp
source/lib/package.h

index 9f8c89503f9c488af8aa699d99db818fd050c452..5741fa6a265943f92ef4f0a20865006bffae9906 100644 (file)
@@ -337,17 +337,17 @@ void BuilderCLI::package_help()
        SourcePackage &main_pkg = dynamic_cast<SourcePackage &>(package_manager.get_main_package());
        const Config &config = main_pkg.get_config();
        const auto &options = config.get_options();
-       const Package::Requirements &requires = main_pkg.get_required_packages();
+       const Package::Requirements &required_pkgs = main_pkg.get_required_packages();
 
-       if(!requires.empty() || !options.empty())
+       if(!required_pkgs.empty() || !options.empty())
                IO::print("\nHelp for package %s:\n", main_pkg.get_name());
 
-       if(!requires.empty())
+       if(!required_pkgs.empty())
        {
                IO::print("\nRequired packages:\n  ");
-               for(auto i=requires.begin(); i!=requires.end(); ++i)
+               for(auto i=required_pkgs.begin(); i!=required_pkgs.end(); ++i)
                {
-                       if(i!=requires.begin())
+                       if(i!=required_pkgs.begin())
                                IO::print(", ");
                        IO::print((*i)->get_name());
                }
index f6ef96cf824d4a13008d7f09f63248f6953753cc..61aa0db855867ed91863ec1e2d99b336c849f4a6 100644 (file)
@@ -14,7 +14,7 @@ using namespace Msp;
 
 void Component::prepare()
 {
-       for(Package *r: requires)
+       for(Package *r: required_pkgs)
        {
                r->prepare();
                broken |= r->is_broken();
@@ -34,7 +34,7 @@ void Component::create_build_info()
        final_build_info.defines[build_macro] = "1";
 
        const Package::Requirements &pkg_reqs = package.get_required_packages();
-       Package::Requirements direct_reqs = requires;
+       Package::Requirements direct_reqs = required_pkgs;
        direct_reqs.insert(direct_reqs.end(), pkg_reqs.begin(), pkg_reqs.end());
        for(Package *r: direct_reqs)
                final_build_info.update_from(r->get_exported_build_info(), BuildInfo::DEPENDENCY);
@@ -181,7 +181,7 @@ void Component::Loader::require(const string &n)
 {
        Package *req = obj.package.get_builder().get_package_manager().find_package(n);
        if(req)
-               obj.requires.push_back(req);
+               obj.required_pkgs.push_back(req);
        else
                obj.problems.push_back(format("Required package %s not found", n));
 }
index 7d9aa1af704e195efed112cbfbd08e3163f9e285..246bd44edd2e07c7fa1fedfb7cc8d7dcce1c1c3d 100644 (file)
@@ -40,7 +40,7 @@ protected:
        std::vector<std::string> overlays;
        bool install = false;
        BuildInfo build_info;
-       Package::Requirements requires;
+       Package::Requirements required_pkgs;
        bool deflt = true;
        InstallMap install_map;
        bool broken = false;
@@ -66,7 +66,7 @@ protected:
 public:
        bool get_install() const { return install; }
        const InstallMap &get_install_map() const { return install_map; }
-       const Package::Requirements &get_required_packages() const { return requires; }
+       const Package::Requirements &get_required_packages() const { return required_pkgs; }
        bool is_default() const { return deflt; }
        bool is_broken() const { return broken; }
        const std::vector<std::string> &get_problems() const { return problems; }
index 25661fc40bb70fdc57ae4d5dfe9bc88f0f46705d..0c3adc5eb1137756f5f7c455ea99b49d37776d85 100644 (file)
@@ -20,7 +20,7 @@ void Package::prepare()
 
        prepared = true;
 
-       for(Package *r: requires)
+       for(Package *r: required_pkgs)
        {
                r->prepare();
                broken |= r->is_broken();
@@ -43,7 +43,7 @@ void Package::Loader::require(const string &n)
 {
        Package *req = obj.builder.get_package_manager().find_package(n);
        if(req)
-               obj.requires.push_back(req);
+               obj.required_pkgs.push_back(req);
        else
                obj.problems.push_back(format("Required package %s not found", n));
 }
index e64c6986cf9e2a2d6f441cce666cbbde68c9db3d..4d2c8dd2b454eb2bd2be18dd02049b6d7b4ffd34 100644 (file)
@@ -35,7 +35,7 @@ protected:
        std::string name;
        std::string label;
 
-       Requirements requires;
+       Requirements required_pkgs;
        BuildInfo export_binfo;
        bool prepared = false;
        bool broken = false;
@@ -50,7 +50,7 @@ public:
        Builder &get_builder() const { return builder; }
        const std::string &get_name() const { return name; }
        const std::string &get_label() const { return label; }
-       const Requirements &get_required_packages() const { return requires; }
+       const Requirements &get_required_packages() const { return required_pkgs; }
 
        const BuildInfo &get_exported_build_info() const { return export_binfo; }