Loading cmds/idmap2/idmap2/CreateMultiple.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ Result<Unit> CreateMultiple(const std::vector<std::string>& args) { std::vector<std::string> idmap_paths; for (const std::string& overlay_apk_path : overlay_apk_paths) { const std::string idmap_path = Idmap::CanonicalIdmapPathFor(idmap_dir, overlay_apk_path); std::string idmap_path = Idmap::CanonicalIdmapPathFor(idmap_dir, overlay_apk_path); const uid_t uid = getuid(); if (!UidHasWriteAccessToPath(uid, idmap_path)) { LOG(WARNING) << "uid " << uid << "does not have write access to " << idmap_path.c_str(); Loading @@ -111,7 +111,7 @@ Result<Unit> CreateMultiple(const std::vector<std::string>& args) { !ignore_overlayable)) { const auto overlay = OverlayResourceContainer::FromPath(overlay_apk_path); if (!overlay) { LOG(WARNING) << "failed to load apk " << overlay_apk_path.c_str(); LOG(WARNING) << "failed to load apk " << overlay_apk_path; continue; } Loading @@ -138,7 +138,7 @@ Result<Unit> CreateMultiple(const std::vector<std::string>& args) { } } idmap_paths.emplace_back(idmap_path); idmap_paths.emplace_back(std::move(idmap_path)); } for (const std::string& idmap_path : idmap_paths) { Loading tools/aapt2/util/Util.h +3 −6 Original line number Diff line number Diff line Loading @@ -111,8 +111,8 @@ const char* GetToolName(); // Retrieves the build fingerprint of aapt2. std::string GetToolFingerprint(); template <typename T> typename std::enable_if<std::is_arithmetic<T>::value, int>::type compare(const T& a, const T& b) { template <std::integral T> int compare(T a, T b) { if (a < b) { return -1; } else if (a > b) { Loading @@ -123,10 +123,7 @@ typename std::enable_if<std::is_arithmetic<T>::value, int>::type compare(const T // Makes a std::unique_ptr<> with the template parameter inferred by the compiler. // This will be present in C++14 and can be removed then. template <typename T, class... Args> std::unique_ptr<T> make_unique(Args&&... args) { return std::unique_ptr<T>(new T{std::forward<Args>(args)...}); } using std::make_unique; // Writes a set of items to the std::ostream, joining the times with the provided separator. template <typename Container> Loading Loading
cmds/idmap2/idmap2/CreateMultiple.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ Result<Unit> CreateMultiple(const std::vector<std::string>& args) { std::vector<std::string> idmap_paths; for (const std::string& overlay_apk_path : overlay_apk_paths) { const std::string idmap_path = Idmap::CanonicalIdmapPathFor(idmap_dir, overlay_apk_path); std::string idmap_path = Idmap::CanonicalIdmapPathFor(idmap_dir, overlay_apk_path); const uid_t uid = getuid(); if (!UidHasWriteAccessToPath(uid, idmap_path)) { LOG(WARNING) << "uid " << uid << "does not have write access to " << idmap_path.c_str(); Loading @@ -111,7 +111,7 @@ Result<Unit> CreateMultiple(const std::vector<std::string>& args) { !ignore_overlayable)) { const auto overlay = OverlayResourceContainer::FromPath(overlay_apk_path); if (!overlay) { LOG(WARNING) << "failed to load apk " << overlay_apk_path.c_str(); LOG(WARNING) << "failed to load apk " << overlay_apk_path; continue; } Loading @@ -138,7 +138,7 @@ Result<Unit> CreateMultiple(const std::vector<std::string>& args) { } } idmap_paths.emplace_back(idmap_path); idmap_paths.emplace_back(std::move(idmap_path)); } for (const std::string& idmap_path : idmap_paths) { Loading
tools/aapt2/util/Util.h +3 −6 Original line number Diff line number Diff line Loading @@ -111,8 +111,8 @@ const char* GetToolName(); // Retrieves the build fingerprint of aapt2. std::string GetToolFingerprint(); template <typename T> typename std::enable_if<std::is_arithmetic<T>::value, int>::type compare(const T& a, const T& b) { template <std::integral T> int compare(T a, T b) { if (a < b) { return -1; } else if (a > b) { Loading @@ -123,10 +123,7 @@ typename std::enable_if<std::is_arithmetic<T>::value, int>::type compare(const T // Makes a std::unique_ptr<> with the template parameter inferred by the compiler. // This will be present in C++14 and can be removed then. template <typename T, class... Args> std::unique_ptr<T> make_unique(Args&&... args) { return std::unique_ptr<T>(new T{std::forward<Args>(args)...}); } using std::make_unique; // Writes a set of items to the std::ostream, joining the times with the provided separator. template <typename Container> Loading