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

Side by Side Diff: util/posix/symbolic_constants_posix.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/numeric/int128_test.cc ('k') | util/stdlib/string_number_conversion.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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 "VTALRM", 92 "VTALRM",
93 "PROF", 93 "PROF",
94 "WINCH", 94 "WINCH",
95 "IO", 95 "IO",
96 "PWR", 96 "PWR",
97 "SYS", 97 "SYS",
98 #endif 98 #endif
99 }; 99 };
100 #if defined(OS_LINUX) 100 #if defined(OS_LINUX)
101 // NSIG is 64 to account for real-time signals. 101 // NSIG is 64 to account for real-time signals.
102 COMPILE_ASSERT(arraysize(kSignalNames) == 32, kSignalNames_length); 102 static_assert(arraysize(kSignalNames) == 32, "kSignalNames length");
103 #else 103 #else
104 COMPILE_ASSERT(arraysize(kSignalNames) == NSIG, kSignalNames_length); 104 static_assert(arraysize(kSignalNames) == NSIG, "kSignalNames length");
105 #endif 105 #endif
106 106
107 const char kSigPrefix[] = "SIG"; 107 const char kSigPrefix[] = "SIG";
108 108
109 } // namespace 109 } // namespace
110 110
111 namespace crashpad { 111 namespace crashpad {
112 112
113 std::string SignalToString(int signal, 113 std::string SignalToString(int signal,
114 SymbolicConstantToStringOptions options) { 114 SymbolicConstantToStringOptions options) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 if (options & kAllowNumber) { 159 if (options & kAllowNumber) {
160 return StringToNumber(string, signal); 160 return StringToNumber(string, signal);
161 } 161 }
162 162
163 return false; 163 return false;
164 } 164 }
165 165
166 } // namespace crashpad 166 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/numeric/int128_test.cc ('k') | util/stdlib/string_number_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698