]> git.tdb.fi Git - builder.git/commitdiff
Adapt to changes in mspcore
authorMikko Rasa <tdb@tdb.fi>
Sun, 29 Aug 2021 20:37:17 +0000 (23:37 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 29 Aug 2021 20:58:21 +0000 (23:58 +0300)
source/androidtools.cpp
source/architecture.cpp
source/architecture.h
source/component.cpp
source/datatransform.cpp
source/packagemanager.cpp

index eeb6edf532d379948739e5efde7ee3b028c6bc06..93b7bfac7a05d941f128ab55fcf05c088736e51d 100644 (file)
@@ -51,9 +51,9 @@ AndroidDevKit::AndroidDevKit(Builder &b, const string &type, const FS::Path &def
                return;
 
        builder.get_logger().log("files", format("Traversing %s", platforms_dir.str()));
-       list<string> platforms = list_filtered(platforms_dir, "^android-[1-9][0-9]*$");
+       vector<string> platforms = list_filtered(platforms_dir, "^android-[1-9][0-9]*$");
 
-       for(list<string>::const_iterator i=platforms.begin(); i!=platforms.end(); ++i)
+       for(vector<string>::const_iterator i=platforms.begin(); i!=platforms.end(); ++i)
                supported_api_levels.insert(lexical_cast<unsigned>(i->substr(8)));
 }
 
@@ -82,11 +82,11 @@ void AndroidSdk::find_build_tools_dir()
        }
 
        builder.get_logger().log("files", format("Traversing %s", bt_dir.str()));
-       list<string> tool_versions = list_files(bt_dir);
+       vector<string> tool_versions = list_files(bt_dir);
 
        string use_tools;
        unsigned latest_version = 0;
-       for(list<string>::const_iterator i=tool_versions.begin(); i!=tool_versions.end(); ++i)
+       for(vector<string>::const_iterator i=tool_versions.begin(); i!=tool_versions.end(); ++i)
        {
                unsigned version = parse_version(*i);
                if(version>latest_version)
@@ -150,11 +150,11 @@ void AndroidNdk::find_toolchain_dir()
 
        builder.get_logger().log("files", format("Traversing %s", toolchains_dir.str()));
        string prefix = architecture.get_cross_prefix()+"-";
-       list<string> toolchains = list_filtered(toolchains_dir, "^"+prefix);
+       vector<string> toolchains = list_filtered(toolchains_dir, "^"+prefix);
 
        string use_toolchain;
        unsigned latest_version = 0;
-       for(list<string>::const_iterator i=toolchains.begin(); i!=toolchains.end(); ++i)
+       for(vector<string>::const_iterator i=toolchains.begin(); i!=toolchains.end(); ++i)
        {
                string version_str = i->substr(prefix.size());
                string compiler = "gcc";
@@ -203,8 +203,8 @@ void AndroidNdk::init_api_level(unsigned api)
 {
        FS::Path platform_archs_dir = root/"platforms"/format("android-%d", api);
        builder.get_logger().log("files", format("Traversing %s", platform_archs_dir.str()));
-       list<string> platform_archs = list_filtered(platform_archs_dir, "^arch-");
-       for(list<string>::iterator i=platform_archs.begin(); i!=platform_archs.end(); ++i)
+       vector<string> platform_archs = list_filtered(platform_archs_dir, "^arch-");
+       for(vector<string>::iterator i=platform_archs.begin(); i!=platform_archs.end(); ++i)
                i->erase(0, 5);
        string use_arch = architecture.best_match(platform_archs);
 
index 8bdd1bfe8fceef06070f91c6db73b20111e08b5d..3dd76fbf19f86e0e52fca14fee800fee04675dd6 100644 (file)
@@ -174,11 +174,11 @@ bool Architecture::match_name(const string &pattern) const
        return !negate;
 }
 
-string Architecture::best_match(const list<string> &names) const
+string Architecture::best_match(const vector<string> &names) const
 {
        string best;
        unsigned best_size = 0;
-       for(list<string>::const_iterator i=names.begin(); i!=names.end(); ++i)
+       for(vector<string>::const_iterator i=names.begin(); i!=names.end(); ++i)
                if(match_name(*i))
                {
                        /* TODO Do full parse and alias resolution here?  Otherwise x86 and
index 6828ad88337d3cd2b7c17a5b565e922b8e25fd55..752c84a2d19b7afd267ed8863fa630fa34e347cd 100644 (file)
@@ -49,7 +49,7 @@ public:
        const std::string &get_fpu() const { return fpu; }
        const std::string &get_toolchain() const { return toolchain; }
        bool match_name(const std::string &) const;
-       std::string best_match(const std::list<std::string> &) const;
+       std::string best_match(const std::vector<std::string> &) const;
        bool is_native() const { return native; }
        bool is_cross() const { return !cross_prefix.empty(); }
 
index e8fdd5806dfacd341a06b8bd2a1081b465bbf7c2..46e9294d039abb2a4cc9ee33c0180acd595239c1 100644 (file)
@@ -101,8 +101,8 @@ Component::SourceList Component::collect_source_files() const
                        for(SourceList::const_iterator j=dirs.begin(); j!=dirs.end(); ++j)
                        {
                                package.get_builder().get_logger().log("files", format("Traversing %s", *j));
-                               list<string> sfiles = list_files(*j);
-                               for(list<string>::iterator k=sfiles.begin(); k!=sfiles.end(); ++k)
+                               vector<string> sfiles = list_files(*j);
+                               for(vector<string>::iterator k=sfiles.begin(); k!=sfiles.end(); ++k)
                                {
                                        if(j!=dirs.begin())
                                        {
index 2f7e8754b66da94d57eda264608b745f346e8ba3..7b221b3c0bc7e16c4cf4088873d12770bfced578 100644 (file)
@@ -35,7 +35,7 @@ void DataTransform::find_dependencies()
                IO::File in(path.str());
                DataFile::Parser parser(in, path.str());
 
-               list<string> dir_files;
+               vector<string> dir_files;
                while(!in.eof())
                {
                        DataFile::Statement st = parser.parse();
@@ -52,7 +52,7 @@ void DataTransform::find_dependencies()
                                for(DataFile::Statement::Arguments::const_iterator i=st.args.begin(); i!=st.args.end(); ++i)
                                {
                                        Regex re(i->get<string>());
-                                       for(list<string>::const_iterator j=dir_files.begin(); j!=dir_files.end(); ++j)
+                                       for(vector<string>::const_iterator j=dir_files.begin(); j!=dir_files.end(); ++j)
                                                if(re.match(*j))
                                                        files.push_back(*j);
                                }
index 2ee3c30de63f67bca4f649d27326d9b97e05d4f1..35c752e8e4e056d979e1b55d536f94e66219ea04 100644 (file)
@@ -193,9 +193,9 @@ FS::Path PackageManager::get_package_location(const string &name)
                for(SearchPath::const_iterator i=pkg_path.begin(); i!=pkg_path.end(); ++i)
                {
                        builder.get_logger().log("files", format("Traversing %s", *i));
-                       list<string> files = list_files(*i);
+                       vector<string> files = list_files(*i);
                        unsigned count = 0;
-                       for(list<string>::const_iterator j=files.begin(); j!=files.end(); ++j)
+                       for(vector<string>::const_iterator j=files.begin(); j!=files.end(); ++j)
                        {
                                FS::Path full = *i / *j;
                                if(FS::exists(full/"Build"))
@@ -235,8 +235,8 @@ FS::Path PackageManager::get_binary_package_file(const string &name)
                for(list<FS::Path>::const_iterator i=binpkg_path.begin(); i!=binpkg_path.end(); ++i)
                {
                        builder.get_logger().log("files", format("Traversing %s", *i));
-                       list<string> files = list_filtered(*i, "\\.bpk$");
-                       for(list<string>::const_iterator j=files.begin(); j!=files.end(); ++j)
+                       vector<string> files = list_filtered(*i, "\\.bpk$");
+                       for(vector<string>::const_iterator j=files.begin(); j!=files.end(); ++j)
                                binpkg_files.push_back(*i / *j);
                        builder.get_logger().log("packagemgr", format("%d binary packages found in %s", files.size(), *i));
                }