Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3881659 authored by Todd Kennedy's avatar Todd Kennedy Committed by Android (Google) Code Review
Browse files

Merge "idmap2: fix clang-tidy warnings [modernize-*]"

parents bba1694d 0eba72a4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@

using android::idmap2::CommandLineOptions;

typedef std::map<std::string, std::function<bool(const std::vector<std::string>&, std::ostream&)>>
    NameToFunctionMap;
using NameToFunctionMap =
    std::map<std::string, std::function<bool(const std::vector<std::string>&, std::ostream&)>>;

namespace {

+4 −5
Original line number Diff line number Diff line
@@ -56,8 +56,7 @@ std::unique_ptr<std::vector<std::string>> FindApkFiles(const std::vector<std::st
    }
    paths.insert(apk_paths->cbegin(), apk_paths->cend());
  }
  return std::unique_ptr<std::vector<std::string>>(
      new std::vector<std::string>(paths.cbegin(), paths.cend()));
  return std::make_unique<std::vector<std::string>>(paths.cbegin(), paths.cend());
}
}  // namespace

@@ -138,15 +137,15 @@ bool Scan(const std::vector<std::string>& args, std::ostream& out_error) {
  }

  std::stringstream stream;
  for (auto iter = interesting_apks.cbegin(); iter != interesting_apks.cend(); ++iter) {
    const std::string idmap_path = Idmap::CanonicalIdmapPathFor(output_directory, *iter);
  for (const auto& apk : interesting_apks) {
    const std::string idmap_path = Idmap::CanonicalIdmapPathFor(output_directory, apk);
    std::stringstream dev_null;
    if (!Verify(std::vector<std::string>({"--idmap-path", idmap_path}), dev_null) &&
        !Create(std::vector<std::string>({
                    "--target-apk-path",
                    target_apk_path,
                    "--overlay-apk-path",
                    *iter,
                    apk,
                    "--idmap-path",
                    idmap_path,
                }),
+3 −5
Original line number Diff line number Diff line
@@ -56,8 +56,7 @@ Status error(const std::string& msg) {

}  // namespace

namespace android {
namespace os {
namespace android::os {

Status Idmap2Service::getIdmapPath(const std::string& overlay_apk_path,
                                   int32_t user_id ATTRIBUTE_UNUSED, std::string* _aidl_return) {
@@ -132,9 +131,8 @@ Status Idmap2Service::createIdmap(const std::string& target_apk_path,
    return error("failed to write to idmap path " + idmap_path);
  }

  _aidl_return->reset(new std::string(idmap_path));
  *_aidl_return = std::make_unique<std::string>(idmap_path);
  return ok();
}

}  // namespace os
}  // namespace android
}  // namespace android::os
+4 −4
Original line number Diff line number Diff line
@@ -25,8 +25,8 @@

#include "android/os/BnIdmap2.h"

namespace android {
namespace os {
namespace android::os {

class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 {
 public:
  static char const* getServiceName() {
@@ -46,7 +46,7 @@ class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 {
                             const std::string& overlay_apk_path, int32_t user_id,
                             std::unique_ptr<std::string>* _aidl_return);
};
}  // namespace os
}  // namespace android

}  // namespace android::os

#endif  // IDMAP2_IDMAP2D_IDMAP2SERVICE_H_
+2 −4
Original line number Diff line number Diff line
@@ -23,8 +23,7 @@

#include "idmap2/Idmap.h"

namespace android {
namespace idmap2 {
namespace android::idmap2 {

class BinaryStreamVisitor : public Visitor {
 public:
@@ -43,7 +42,6 @@ class BinaryStreamVisitor : public Visitor {
  std::ostream& stream_;
};

}  // namespace idmap2
}  // namespace android
}  // namespace android::idmap2

#endif  // IDMAP2_INCLUDE_IDMAP2_BINARYSTREAMVISITOR_H_
Loading