Merge "Fix clang-tidy performance warnings in libhardware."

am: 1c1e311e06

Change-Id: I00ee76484a102dc1577566fe370af16f9283fc3e
This commit is contained in:
Chih-Hung Hsieh 2016-08-04 22:03:49 +00:00 committed by android-build-merger
commit 5f366ef448
4 changed files with 6 additions and 6 deletions

View file

@ -334,7 +334,7 @@ public:
int height, int height,
const sp<CameraDeviceBase>& device, const sp<CameraDeviceBase>& device,
CameraStreamParams param = DEFAULT_STREAM_PARAMETERS, CameraStreamParams param = DEFAULT_STREAM_PARAMETERS,
sp<Surface> surface = NULL, const sp<Surface>& surface = NULL,
bool useCpuConsumer = true) { bool useCpuConsumer = true) {
param.mFormat = MapAutoFormat(param.mFormat); param.mFormat = MapAutoFormat(param.mFormat);
return new CameraStream(width, height, device, return new CameraStream(width, height, device,

View file

@ -176,7 +176,7 @@ status_t MetadataQueue::setStreamSlot(const List<camera_metadata_t*> &bufs) {
} }
status_t MetadataQueue::freeBuffers(List<camera_metadata_t*>::iterator start, status_t MetadataQueue::freeBuffers(List<camera_metadata_t*>::iterator start,
List<camera_metadata_t*>::iterator end) { const List<camera_metadata_t*>::iterator& end) {
while (start != end) { while (start != end) {
free_camera_metadata(*start); free_camera_metadata(*start);
start = mStreamSlot.erase(start); start = mStreamSlot.erase(start);

View file

@ -65,7 +65,7 @@ class MetadataQueue: public camera2_request_queue_src_ops_t,
private: private:
status_t freeBuffers(List<camera_metadata_t*>::iterator start, status_t freeBuffers(List<camera_metadata_t*>::iterator start,
List<camera_metadata_t*>::iterator end); const List<camera_metadata_t*>::iterator& end);
camera2_device_t *mDevice; camera2_device_t *mDevice;

View file

@ -50,9 +50,9 @@ public:
mInputCb(kNoopInputCb), mDeviceAddedCb(kNoopDeviceCb), mDeviceRemovedCb(kNoopDeviceCb) {} mInputCb(kNoopInputCb), mDeviceAddedCb(kNoopDeviceCb), mDeviceRemovedCb(kNoopDeviceCb) {}
virtual ~TestInputCallback() = default; virtual ~TestInputCallback() = default;
void setInputCallback(InputCbFunc cb) { mInputCb = cb; } void setInputCallback(const InputCbFunc& cb) { mInputCb = cb; }
void setDeviceAddedCallback(DeviceCbFunc cb) { mDeviceAddedCb = cb; } void setDeviceAddedCallback(const DeviceCbFunc& cb) { mDeviceAddedCb = cb; }
void setDeviceRemovedCallback(DeviceCbFunc cb) { mDeviceRemovedCb = cb; } void setDeviceRemovedCallback(const DeviceCbFunc& cb) { mDeviceRemovedCb = cb; }
virtual void onInputEvent(const std::shared_ptr<InputDeviceNode>& node, InputEvent& event, virtual void onInputEvent(const std::shared_ptr<InputDeviceNode>& node, InputEvent& event,
nsecs_t event_time) override { nsecs_t event_time) override {