Merge "Fix clang-tidy performance warnings in libhardware." am: 1c1e311e06 am: 5f366ef448

am: 90383959ac

Change-Id: I7cd8374bde5d8fab6c17b3f5386eb195f1adf1c7
This commit is contained in:
Chih-Hung Hsieh 2016-08-04 22:09:18 +00:00 committed by android-build-merger
commit 31a6b95815
4 changed files with 6 additions and 6 deletions

View file

@ -334,7 +334,7 @@ public:
int height,
const sp<CameraDeviceBase>& device,
CameraStreamParams param = DEFAULT_STREAM_PARAMETERS,
sp<Surface> surface = NULL,
const sp<Surface>& surface = NULL,
bool useCpuConsumer = true) {
param.mFormat = MapAutoFormat(param.mFormat);
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,
List<camera_metadata_t*>::iterator end) {
const List<camera_metadata_t*>::iterator& end) {
while (start != end) {
free_camera_metadata(*start);
start = mStreamSlot.erase(start);

View file

@ -65,7 +65,7 @@ class MetadataQueue: public camera2_request_queue_src_ops_t,
private:
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;

View file

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