From 4ee988cdd18d919b11355c21e5234c3f28f5d6a7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 29 Aug 2021 23:37:17 +0300 Subject: [PATCH] Adapt to changes in mspcore --- source/androidtools.cpp | 16 ++++++++-------- source/architecture.cpp | 4 ++-- source/architecture.h | 2 +- source/component.cpp | 4 ++-- source/datatransform.cpp | 4 ++-- source/packagemanager.cpp | 8 ++++---- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/source/androidtools.cpp b/source/androidtools.cpp index eeb6edf..93b7bfa 100644 --- a/source/androidtools.cpp +++ b/source/androidtools.cpp @@ -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 platforms = list_filtered(platforms_dir, "^android-[1-9][0-9]*$"); + vector platforms = list_filtered(platforms_dir, "^android-[1-9][0-9]*$"); - for(list::const_iterator i=platforms.begin(); i!=platforms.end(); ++i) + for(vector::const_iterator i=platforms.begin(); i!=platforms.end(); ++i) supported_api_levels.insert(lexical_cast(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 tool_versions = list_files(bt_dir); + vector tool_versions = list_files(bt_dir); string use_tools; unsigned latest_version = 0; - for(list::const_iterator i=tool_versions.begin(); i!=tool_versions.end(); ++i) + for(vector::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 toolchains = list_filtered(toolchains_dir, "^"+prefix); + vector toolchains = list_filtered(toolchains_dir, "^"+prefix); string use_toolchain; unsigned latest_version = 0; - for(list::const_iterator i=toolchains.begin(); i!=toolchains.end(); ++i) + for(vector::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 platform_archs = list_filtered(platform_archs_dir, "^arch-"); - for(list::iterator i=platform_archs.begin(); i!=platform_archs.end(); ++i) + vector platform_archs = list_filtered(platform_archs_dir, "^arch-"); + for(vector::iterator i=platform_archs.begin(); i!=platform_archs.end(); ++i) i->erase(0, 5); string use_arch = architecture.best_match(platform_archs); diff --git a/source/architecture.cpp b/source/architecture.cpp index 8bdd1bf..3dd76fb 100644 --- a/source/architecture.cpp +++ b/source/architecture.cpp @@ -174,11 +174,11 @@ bool Architecture::match_name(const string &pattern) const return !negate; } -string Architecture::best_match(const list &names) const +string Architecture::best_match(const vector &names) const { string best; unsigned best_size = 0; - for(list::const_iterator i=names.begin(); i!=names.end(); ++i) + for(vector::const_iterator i=names.begin(); i!=names.end(); ++i) if(match_name(*i)) { /* TODO Do full parse and alias resolution here? Otherwise x86 and diff --git a/source/architecture.h b/source/architecture.h index 6828ad8..752c84a 100644 --- a/source/architecture.h +++ b/source/architecture.h @@ -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 &) const; + std::string best_match(const std::vector &) const; bool is_native() const { return native; } bool is_cross() const { return !cross_prefix.empty(); } diff --git a/source/component.cpp b/source/component.cpp index e8fdd58..46e9294 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -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 sfiles = list_files(*j); - for(list::iterator k=sfiles.begin(); k!=sfiles.end(); ++k) + vector sfiles = list_files(*j); + for(vector::iterator k=sfiles.begin(); k!=sfiles.end(); ++k) { if(j!=dirs.begin()) { diff --git a/source/datatransform.cpp b/source/datatransform.cpp index 2f7e875..7b221b3 100644 --- a/source/datatransform.cpp +++ b/source/datatransform.cpp @@ -35,7 +35,7 @@ void DataTransform::find_dependencies() IO::File in(path.str()); DataFile::Parser parser(in, path.str()); - list dir_files; + vector 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()); - for(list::const_iterator j=dir_files.begin(); j!=dir_files.end(); ++j) + for(vector::const_iterator j=dir_files.begin(); j!=dir_files.end(); ++j) if(re.match(*j)) files.push_back(*j); } diff --git a/source/packagemanager.cpp b/source/packagemanager.cpp index 2ee3c30..35c752e 100644 --- a/source/packagemanager.cpp +++ b/source/packagemanager.cpp @@ -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 files = list_files(*i); + vector files = list_files(*i); unsigned count = 0; - for(list::const_iterator j=files.begin(); j!=files.end(); ++j) + for(vector::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::const_iterator i=binpkg_path.begin(); i!=binpkg_path.end(); ++i) { builder.get_logger().log("files", format("Traversing %s", *i)); - list files = list_filtered(*i, "\\.bpk$"); - for(list::const_iterator j=files.begin(); j!=files.end(); ++j) + vector files = list_filtered(*i, "\\.bpk$"); + for(vector::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)); } -- 2.45.2