| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "device/sensors/public/cpp/motion_data.h" | 5 #include "services/device/public/cpp/sensors/motion_data.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 namespace device { | 9 namespace device { |
| 10 | 10 |
| 11 MotionData::MotionData() { | 11 MotionData::MotionData() { |
| 12 // Make sure to zero out the memory so that there are no uninitialized bits. | 12 // Make sure to zero out the memory so that there are no uninitialized bits. |
| 13 // This object is used in the shared memory buffer and is memory copied by | 13 // This object is used in the shared memory buffer and is memory copied by |
| 14 // two processes. Valgrind will complain if we copy around memory that is | 14 // two processes. Valgrind will complain if we copy around memory that is |
| 15 // only partially initialized. | 15 // only partially initialized. |
| 16 memset(this, 0, sizeof(*this)); | 16 memset(this, 0, sizeof(*this)); |
| 17 } | 17 } |
| 18 | 18 |
| 19 MotionData::MotionData(const MotionData& other) = default; | 19 MotionData::MotionData(const MotionData& other) = default; |
| 20 | 20 |
| 21 } // namespace device | 21 } // namespace device |
| OLD | NEW |