Clarify usage of smart pointers
- Members should be smart (shared or unique)
- Prefer function args to be bare, unless the arg is intended to be
stored by the callee
- Function args that are smart should be const refs to avoid an extra
copy
Change-Id: I8052fa432bcffbabff9d67a8d568640cac64d4ad
diff --git a/modules/input/evdev/InputDevice.cpp b/modules/input/evdev/InputDevice.cpp
index c0b59d7..16f8039 100644
--- a/modules/input/evdev/InputDevice.cpp
+++ b/modules/input/evdev/InputDevice.cpp
@@ -34,7 +34,7 @@
namespace android {
-EvdevDevice::EvdevDevice(std::shared_ptr<InputDeviceNode> node) :
+EvdevDevice::EvdevDevice(const std::shared_ptr<InputDeviceNode>& node) :
mDeviceNode(node) {}
void EvdevDevice::processInput(InputEvent& event, nsecs_t currentTime) {