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 #include "device/sensors/public/cpp/motion_data.h" |
| 6 |
| 7 #include <string.h> |
| 8 |
| 9 namespace device { |
| 10 |
| 11 MotionData::MotionData() { |
| 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 |
| 14 // two processes. Valgrind will complain if we copy around memory that is |
| 15 // only partially initialized. |
| 16 memset(this, 0, sizeof(*this)); |
| 17 } |
| 18 |
| 19 MotionData::MotionData(const MotionData& other) = default; |
| 20 |
| 21 } // namespace device |
OLD | NEW |