Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 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 #ifndef DEVICE_SENSORS_PUBLIC_CPP_ORIENTATION_DATA_H_ | |
| 6 #define DEVICE_SENSORS_PUBLIC_CPP_ORIENTATION_DATA_H_ | |
| 7 | |
| 8 namespace device { | |
| 9 | |
| 10 #pragma pack(push, 1) | |
| 11 | |
| 12 class OrientationData { | |
| 13 public: | |
| 14 OrientationData(); | |
|
timvolodine
2016/10/24 16:23:43
so here we don't need a copy-constructor like in m
blundell
2016/10/24 16:25:58
That's correct. MotionData is copied but Orientati
timvolodine
2016/10/24 18:13:20
hmm that's weird, not sure where that would happen
| |
| 15 ~OrientationData() {} | |
| 16 | |
| 17 double alpha; | |
| 18 double beta; | |
| 19 double gamma; | |
| 20 | |
| 21 bool hasAlpha : 1; | |
| 22 bool hasBeta : 1; | |
| 23 bool hasGamma : 1; | |
| 24 | |
| 25 bool absolute : 1; | |
| 26 | |
| 27 bool allAvailableSensorsAreActive : 1; | |
| 28 }; | |
| 29 | |
| 30 static_assert(sizeof(OrientationData) == | |
| 31 (3 * sizeof(double) + 1 * sizeof(char)), | |
| 32 "OrientationData has wrong size"); | |
| 33 | |
| 34 #pragma pack(pop) | |
| 35 | |
| 36 } // namespace device | |
| 37 | |
| 38 #endif // DEVICE_SENSORS_PUBLIC_CPP_ORIENTATION_DATA_H_ | |
| OLD | NEW |