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

Side by Side Diff: tools/ipc_fuzzer/ipclist/ipclist.cc

Issue 825323002: replace COMPILE_ASSERT with static_assert in tools/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <iostream> 6 #include <iostream>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 16 matching lines...) Expand all
27 // Redefine macros to generate table 27 // Redefine macros to generate table
28 #include "ipc/ipc_message_null_macros.h" 28 #include "ipc/ipc_message_null_macros.h"
29 #undef IPC_MESSAGE_DECL 29 #undef IPC_MESSAGE_DECL
30 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \ 30 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \
31 { #name, __FILE__, IPC_MESSAGE_ID(), in, out }, 31 { #name, __FILE__, IPC_MESSAGE_ID(), in, out },
32 32
33 static msginfo msgtable[] = { 33 static msginfo msgtable[] = {
34 #include "tools/ipc_fuzzer/message_lib/all_messages.h" 34 #include "tools/ipc_fuzzer/message_lib/all_messages.h"
35 }; 35 };
36 #define MSGTABLE_SIZE (sizeof(msgtable)/sizeof(msgtable[0])) 36 #define MSGTABLE_SIZE (sizeof(msgtable)/sizeof(msgtable[0]))
37 COMPILE_ASSERT(MSGTABLE_SIZE, CHECK_YOUR_HEADERS_FOR_AN_EXTRA_SEMICOLON); 37 static_assert(MSGTABLE_SIZE, "check your headers for na extra semicolon");
Robert Sesek 2015/01/06 15:39:44 na -> an
Mostyn Bramley-Moore 2015/01/06 18:41:13 Done.
38 38
39 static bool check_msgtable() { 39 static bool check_msgtable() {
40 bool result = true; 40 bool result = true;
41 int previous_class_id = 0; 41 int previous_class_id = 0;
42 int highest_class_id = 0; 42 int highest_class_id = 0;
43 const char* file_name = "NONE"; 43 const char* file_name = "NONE";
44 const char* previous_file_name = "NONE"; 44 const char* previous_file_name = "NONE";
45 std::vector<int> exemptions; 45 std::vector<int> exemptions;
46 46
47 // Exclude test and other non-browser files from consideration. Do not 47 // Exclude test and other non-browser files from consideration. Do not
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 std::sort(msgtable, msgtable + MSGTABLE_SIZE); 172 std::sort(msgtable, msgtable + MSGTABLE_SIZE);
173 173
174 if (!skip_check && check_msgtable() == false) 174 if (!skip_check && check_msgtable() == false)
175 return 1; 175 return 1;
176 176
177 dump_msgtable(show_args, show_ids, show_comma, filter); 177 dump_msgtable(show_args, show_ids, show_comma, filter);
178 return 0; 178 return 0;
179 } 179 }
180 180
OLDNEW
« tools/android/forwarder2/common.h ('K') | « tools/android/memdump/memdump.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698