OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "device/generic_sensor/public/cpp/sensor_reading.h" | |
6 | |
7 namespace device { | |
8 | |
9 SensorReading::SensorReading() = default; | |
10 SensorReading::SensorReading(const SensorReading& other) = default; | |
11 SensorReading::~SensorReading() = default; | |
12 | |
13 SensorReadingSharedBuffer::SensorReadingSharedBuffer() = default; | |
14 SensorReadingSharedBuffer::~SensorReadingSharedBuffer() = default; | |
15 | |
16 // static | |
17 uint64_t SensorReadingSharedBuffer::GetOffset(mojom::SensorType type) { | |
18 return (static_cast<uint64_t>(mojom::SensorType::LAST) - | |
19 static_cast<uint64_t>(type)) * | |
20 sizeof(SensorReadingSharedBuffer); | |
21 } | |
22 | |
23 } // namespace device | |
OLD | NEW |