Loading init/action.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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) { 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 { std::size_t Action::NumCommands() const { Loading init/action_manager.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,7 @@ void ActionManager::QueueAllPropertyActions() { void ActionManager::QueueBuiltinAction(BuiltinFunction func, const std::string& name) { void ActionManager::QueueBuiltinAction(BuiltinFunction func, const std::string& name) { auto action = std::make_unique<Action>(true, nullptr, "<Builtin Action>", 0, name, auto action = std::make_unique<Action>(true, nullptr, "<Builtin Action>", 0, name, std::map<std::string, std::string>{}); std::map<std::string, std::string>{}); action->AddCommand(func, {name}, 0); action->AddCommand(std::move(func), {name}, 0); event_queue_.emplace(action.get()); event_queue_.emplace(action.get()); actions_.emplace_back(std::move(action)); actions_.emplace_back(std::move(action)); Loading init/devices.h +3 −3 Original line number Original line Diff line number Diff line Loading @@ -84,9 +84,9 @@ class Subsystem { }; }; Subsystem() {} Subsystem() {} Subsystem(const std::string& name) : name_(name) {} Subsystem(std::string name) : name_(std::move(name)) {} Subsystem(const std::string& name, DevnameSource source, const std::string& dir_name) Subsystem(std::string name, DevnameSource source, std::string dir_name) : name_(name), devname_source_(source), dir_name_(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, // 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 // according to the rules parsed from ueventd.rc Loading init/devices_test.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ namespace init { class DeviceHandlerTester { class DeviceHandlerTester { public: public: void TestGetSymlinks(const std::string& platform_device, const Uevent& uevent, 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; TemporaryDir fake_sys_root; device_handler_.sysfs_mount_point_ = fake_sys_root.path; device_handler_.sysfs_mount_point_ = fake_sys_root.path; Loading init/keychords.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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) { void Keychords::Start(Epoll* epoll, std::function<void(const std::vector<int>&)> handler) { epoll_ = epoll; epoll_ = epoll; handler_ = handler; handler_ = std::move(handler); if (entries_.size()) GeteventOpenDevice(); if (entries_.size()) GeteventOpenDevice(); } } Loading Loading
init/action.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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) { 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 { std::size_t Action::NumCommands() const { Loading
init/action_manager.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,7 @@ void ActionManager::QueueAllPropertyActions() { void ActionManager::QueueBuiltinAction(BuiltinFunction func, const std::string& name) { void ActionManager::QueueBuiltinAction(BuiltinFunction func, const std::string& name) { auto action = std::make_unique<Action>(true, nullptr, "<Builtin Action>", 0, name, auto action = std::make_unique<Action>(true, nullptr, "<Builtin Action>", 0, name, std::map<std::string, std::string>{}); std::map<std::string, std::string>{}); action->AddCommand(func, {name}, 0); action->AddCommand(std::move(func), {name}, 0); event_queue_.emplace(action.get()); event_queue_.emplace(action.get()); actions_.emplace_back(std::move(action)); actions_.emplace_back(std::move(action)); Loading
init/devices.h +3 −3 Original line number Original line Diff line number Diff line Loading @@ -84,9 +84,9 @@ class Subsystem { }; }; Subsystem() {} Subsystem() {} Subsystem(const std::string& name) : name_(name) {} Subsystem(std::string name) : name_(std::move(name)) {} Subsystem(const std::string& name, DevnameSource source, const std::string& dir_name) Subsystem(std::string name, DevnameSource source, std::string dir_name) : name_(name), devname_source_(source), dir_name_(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, // 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 // according to the rules parsed from ueventd.rc Loading
init/devices_test.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ namespace init { class DeviceHandlerTester { class DeviceHandlerTester { public: public: void TestGetSymlinks(const std::string& platform_device, const Uevent& uevent, 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; TemporaryDir fake_sys_root; device_handler_.sysfs_mount_point_ = fake_sys_root.path; device_handler_.sysfs_mount_point_ = fake_sys_root.path; Loading
init/keychords.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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) { void Keychords::Start(Epoll* epoll, std::function<void(const std::vector<int>&)> handler) { epoll_ = epoll; epoll_ = epoll; handler_ = handler; handler_ = std::move(handler); if (entries_.size()) GeteventOpenDevice(); if (entries_.size()) GeteventOpenDevice(); } } Loading