[hardware][interfaces][sensors] fix -Wreorder-init-list

C++20 will require members in a designated initializer to be in order
unlike C99.

Bug: 139945549
Test: mm
Change-Id: I78d64ea2b7df3f2bd3b8503aa553a0523b20d711
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
This commit is contained in:
Nick Desaulniers
2019-10-17 11:10:38 -07:00
parent c325670cf9
commit 0e2911ebe0
2 changed files with 4 additions and 4 deletions

View File

@@ -68,9 +68,9 @@ void convertFromSensorEvent(const sensors_event_t &src, Event *dst) {
typedef ::android::hardware::sensors::V1_0::MetaDataEventType MetaDataEventType;
*dst = {
.sensorHandle = src.sensor,
.sensorType = (SensorType)src.type,
.timestamp = src.timestamp
.timestamp = src.timestamp,
.sensorHandle = src.sensor,
.sensorType = (SensorType)src.type,
};
switch (dst->sensorType) {

View File

@@ -147,8 +147,8 @@ BufferDescriptor GrallocHalWrapper<AllocatorT, MapperT>::getDescriptor(uint32_t
.width = size,
.height = 1,
.layerCount = 1,
.usage = kBufferUsage,
.format = static_cast<decltype(descriptorInfo.format)>(PixelFormat::BLOB),
.usage = kBufferUsage,
};
BufferDescriptor descriptor;