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

Side by Side Diff: util/mach/symbolic_constants_mach.cc

Issue 615923004: Convert COMPILE_ASSERT to static_assert (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 6 years, 2 months 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
« no previous file with comments | « util/mach/mach_message_server_test.cc ('k') | util/misc/uuid.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 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,
(...skipping 24 matching lines...) Expand all
35 "EMULATION", 35 "EMULATION",
36 "SOFTWARE", 36 "SOFTWARE",
37 "BREAKPOINT", 37 "BREAKPOINT",
38 "SYSCALL", 38 "SYSCALL",
39 "MACH_SYSCALL", 39 "MACH_SYSCALL",
40 "RPC_ALERT", 40 "RPC_ALERT",
41 "CRASH", 41 "CRASH",
42 "RESOURCE", 42 "RESOURCE",
43 "GUARD", 43 "GUARD",
44 }; 44 };
45 COMPILE_ASSERT(arraysize(kExceptionNames) == EXC_TYPES_COUNT, 45 static_assert(arraysize(kExceptionNames) == EXC_TYPES_COUNT,
46 kExceptionNames_length); 46 "kExceptionNames length");
47 47
48 const char kExcPrefix[] = "EXC_"; 48 const char kExcPrefix[] = "EXC_";
49 const char kExcMaskPrefix[] = "EXC_MASK_"; 49 const char kExcMaskPrefix[] = "EXC_MASK_";
50 50
51 const char* kBehaviorNames[] = { 51 const char* kBehaviorNames[] = {
52 NULL, 52 NULL,
53 53
54 // sed -Ene 's/^# define[[:space:]]EXCEPTION_([[:graph:]]+)[[:space:]]+[[:di git:]]{1,2}([[:space:]]|$).*/ "\1",/p' 54 // sed -Ene 's/^# define[[:space:]]EXCEPTION_([[:graph:]]+)[[:space:]]+[[:di git:]]{1,2}([[:space:]]|$).*/ "\1",/p'
55 // /usr/include/mach/exception_types.h 55 // /usr/include/mach/exception_types.h
56 "DEFAULT", 56 "DEFAULT",
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 536 }
537 537
538 if (options & kAllowNumber) { 538 if (options & kAllowNumber) {
539 return StringToNumber(string, reinterpret_cast<unsigned int*>(flavor)); 539 return StringToNumber(string, reinterpret_cast<unsigned int*>(flavor));
540 } 540 }
541 541
542 return false; 542 return false;
543 } 543 }
544 544
545 } // namespace crashpad 545 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mach/mach_message_server_test.cc ('k') | util/misc/uuid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698