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

Side by Side Diff: ppapi/shared_impl/ppb_trace_event_impl.cc

Issue 824153003: replace COMPILE_ASSERT with static_assert in ppapi/ (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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/shared_impl/ppb_trace_event_impl.h" 5 #include "ppapi/shared_impl/ppb_trace_event_impl.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "ppapi/thunk/thunk.h" 10 #include "ppapi/thunk/thunk.h"
(...skipping 21 matching lines...) Expand all
32 void TraceEventImpl::AddTraceEvent(int8_t phase, 32 void TraceEventImpl::AddTraceEvent(int8_t phase,
33 const void* category_enabled, 33 const void* category_enabled,
34 const char* name, 34 const char* name,
35 uint64_t id, 35 uint64_t id,
36 uint32_t num_args, 36 uint32_t num_args,
37 const char* arg_names[], 37 const char* arg_names[],
38 const uint8_t arg_types[], 38 const uint8_t arg_types[],
39 const uint64_t arg_values[], 39 const uint64_t arg_values[],
40 uint8_t flags) { 40 uint8_t flags) {
41 41
42 COMPILE_ASSERT(sizeof(unsigned long long) == sizeof(uint64_t), msg); 42 static_assert(sizeof(unsigned long long) == sizeof(uint64_t),
43 "unexpected data type sizes");
43 44
44 base::debug::TraceLog::GetInstance()->AddTraceEvent( 45 base::debug::TraceLog::GetInstance()->AddTraceEvent(
45 phase, 46 phase,
46 static_cast<const unsigned char*>(category_enabled), 47 static_cast<const unsigned char*>(category_enabled),
47 name, 48 name,
48 id, 49 id,
49 num_args, 50 num_args,
50 arg_names, 51 arg_names,
51 arg_types, 52 arg_types,
52 // This cast is necessary for LP64 systems, where uint64_t is defined as 53 // This cast is necessary for LP64 systems, where uint64_t is defined as
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 const PPB_Trace_Event_Dev_0_1* GetPPB_Trace_Event_Dev_0_1_Thunk() { 124 const PPB_Trace_Event_Dev_0_1* GetPPB_Trace_Event_Dev_0_1_Thunk() {
124 return &g_ppb_trace_event_thunk_0_1; 125 return &g_ppb_trace_event_thunk_0_1;
125 } 126 }
126 127
127 const PPB_Trace_Event_Dev_0_2* GetPPB_Trace_Event_Dev_0_2_Thunk() { 128 const PPB_Trace_Event_Dev_0_2* GetPPB_Trace_Event_Dev_0_2_Thunk() {
128 return &g_ppb_trace_event_thunk_0_2; 129 return &g_ppb_trace_event_thunk_0_2;
129 } 130 }
130 131
131 } // namespace thunk 132 } // namespace thunk
132 } // namespace ppapi 133 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_gamepad_shared.cc ('k') | ppapi/shared_impl/private/net_address_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698