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

Commit 8a779ee9 authored by Tom Cherry's avatar Tom Cherry Committed by Gerrit Code Review
Browse files

Merge "init: fix clang-tidy performance issues"

parents bde9fc17 7c1d87e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ Result<void> Action::AddCommand(std::vector<std::string>&& args, int line) {
}

void Action::AddCommand(BuiltinFunction f, std::vector<std::string>&& args, int line) {
    commands_.emplace_back(f, false, std::move(args), line);
    commands_.emplace_back(std::move(f), false, std::move(args), line);
}

std::size_t Action::NumCommands() const {
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ void ActionManager::QueueAllPropertyActions() {
void ActionManager::QueueBuiltinAction(BuiltinFunction func, const std::string& name) {
    auto action = std::make_unique<Action>(true, nullptr, "<Builtin Action>", 0, name,
                                           std::map<std::string, std::string>{});
    action->AddCommand(func, {name}, 0);
    action->AddCommand(std::move(func), {name}, 0);

    event_queue_.emplace(action.get());
    actions_.emplace_back(std::move(action));
+3 −3
Original line number Diff line number Diff line
@@ -84,9 +84,9 @@ class Subsystem {
    };

    Subsystem() {}
    Subsystem(const std::string& name) : name_(name) {}
    Subsystem(const std::string& name, DevnameSource source, const std::string& dir_name)
        : name_(name), devname_source_(source), dir_name_(dir_name) {}
    Subsystem(std::string name) : name_(std::move(name)) {}
    Subsystem(std::string name, DevnameSource source, std::string dir_name)
        : name_(std::move(name)), devname_source_(source), dir_name_(std::move(dir_name)) {}

    // Returns the full path for a uevent of a device that is a member of this subsystem,
    // according to the rules parsed from ueventd.rc
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ namespace init {
class DeviceHandlerTester {
  public:
    void TestGetSymlinks(const std::string& platform_device, const Uevent& uevent,
                         const std::vector<std::string> expected_links) {
                         const std::vector<std::string>& expected_links) {
        TemporaryDir fake_sys_root;
        device_handler_.sysfs_mount_point_ = fake_sys_root.path;

+1 −1
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ void Keychords::Register(const std::vector<int>& keycodes) {

void Keychords::Start(Epoll* epoll, std::function<void(const std::vector<int>&)> handler) {
    epoll_ = epoll;
    handler_ = handler;
    handler_ = std::move(handler);
    if (entries_.size()) GeteventOpenDevice();
}

Loading