Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: third_party/crashpad/crashpad/util/misc/arraysize_unsafe.h

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2016 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 #error This file is not intended to be #included. 15 #ifndef CRASHPAD_UTIL_MISC_ARRAYSIZE_UNSAFE_H_
16 #define CRASHPAD_UTIL_MISC_ARRAYSIZE_UNSAFE_H_
16 17
17 //! \namespace crashpad 18 //! \file
18 //! \brief The main namespace.
19 19
20 //! \namespace crashpad::internal 20 //! \brief Not the safest way of computing an array’s size…
21 //! \brief The internal namespace, not for public use. 21 //!
22 //! `#%include "base/macros.h"` and use its `arraysize()` instead. This macro
23 //! should only be used in rare situations where `arraysize()` does not
24 //! function.
25 #define ARRAYSIZE_UNSAFE(array) (sizeof(array) / sizeof(array[0]))
22 26
23 //! \namespace crashpad::test 27 #endif // CRASHPAD_UTIL_MISC_ARRAYSIZE_UNSAFE_H_
24 //! \brief The testing namespace, for use in test code only.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698