Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. | 13 // limitations under the License. |
| 14 | 14 |
| 15 #include "snapshot/test/test_memory_map_region_snapshot.h" | 15 #ifndef CRASHPAD_UTIL_MISC_MOVE_H_ |
|
Mark Mentovai
2015/11/30 21:47:51
Ought to be in util/stdlib, where we put stdlibby
danakj
2015/11/30 22:07:01
Done.
| |
| 16 #define CRASHPAD_UTIL_MISC_MOVE_H_ | |
| 16 | 17 |
| 17 namespace crashpad { | 18 namespace crashpad { |
| 18 namespace test { | |
| 19 | 19 |
| 20 TestMemoryMapRegionSnapshot::TestMemoryMapRegionSnapshot() : memory_info_() { | 20 // A replacement for std::remove_reference until C++11 library support is |
|
scottmg
2015/11/30 21:45:35
These need to be //! \brief, and indent the second
danakj
2015/11/30 22:07:01
Done.
| |
| 21 // available. | |
| 22 template <class T> | |
| 23 struct remove_reference { using type = T; }; | |
| 24 template <class T> | |
| 25 struct remove_reference<T&> { using type = T; }; | |
| 26 | |
| 27 // A replacement for std::move() until C++11 library support is available. | |
|
Mark Mentovai
2015/11/30 21:47:51
Does it work to define crashpad::move() and these
danakj
2015/11/30 22:07:01
Sure, we could do that. Idk that it's buying us an
| |
| 28 template<typename T> | |
| 29 typename remove_reference<T>::type&& move(T&& t) { | |
| 30 return static_cast<typename remove_reference<T>::type&&>(t); | |
| 21 } | 31 } |
| 22 | 32 |
| 23 TestMemoryMapRegionSnapshot::~TestMemoryMapRegionSnapshot() { | 33 } // namespace crashpad |
| 24 } | |
| 25 | 34 |
| 26 void TestMemoryMapRegionSnapshot::SetMindumpMemoryInfo( | 35 #endif // CRASHPAD_UTIL_MISC_MOVE_H_ |
| 27 const MINIDUMP_MEMORY_INFO& mmi) { | |
| 28 memory_info_ = mmi; | |
| 29 } | |
| 30 | |
| 31 const MINIDUMP_MEMORY_INFO& TestMemoryMapRegionSnapshot::AsMinidumpMemoryInfo() | |
| 32 const { | |
| 33 return memory_info_; | |
| 34 } | |
| 35 | |
| 36 } // namespace test | |
| 37 } // namespace crashpad | |
| OLD | NEW |