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

Side by Side Diff: third_party/WebKit/Source/wtf/InstanceCounter.h

Issue 1436153002: Apply clang-format with Chromium-style without column limit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 22 matching lines...) Expand all
33 33
34 class String; 34 class String;
35 WTF_EXPORT String dumpRefCountedInstanceCounts(); 35 WTF_EXPORT String dumpRefCountedInstanceCounts();
36 36
37 #if ENABLE(INSTANCE_COUNTER) || ENABLE(DETAILED_MEMORY_INFRA) 37 #if ENABLE(INSTANCE_COUNTER) || ENABLE(DETAILED_MEMORY_INFRA)
38 WTF_EXPORT void incrementInstanceCount(const char* extractNameFunctionName, void * ptr); 38 WTF_EXPORT void incrementInstanceCount(const char* extractNameFunctionName, void * ptr);
39 WTF_EXPORT void decrementInstanceCount(const char* extractNameFunctionName, void * ptr); 39 WTF_EXPORT void decrementInstanceCount(const char* extractNameFunctionName, void * ptr);
40 40
41 WTF_EXPORT String extractTypeNameFromFunctionName(const char* funcName); 41 WTF_EXPORT String extractTypeNameFromFunctionName(const char* funcName);
42 42
43 template<typename T> 43 template <typename T>
44 inline const char* extractNameFunction() 44 inline const char* extractNameFunction() {
45 { 45 return WTF_PRETTY_FUNCTION;
46 return WTF_PRETTY_FUNCTION;
47 } 46 }
48 47
49 48 template <typename T>
50 template<typename T> 49 inline void incrementInstanceCount(T* p) {
51 inline void incrementInstanceCount(T* p) 50 incrementInstanceCount(extractNameFunction<T>(), p);
52 {
53 incrementInstanceCount(extractNameFunction<T>(), p);
54 } 51 }
55 52
56 template<typename T> 53 template <typename T>
57 inline void decrementInstanceCount(T* p) 54 inline void decrementInstanceCount(T* p) {
58 { 55 decrementInstanceCount(extractNameFunction<T>(), p);
59 decrementInstanceCount(extractNameFunction<T>(), p);
60 } 56 }
61 57
62 #endif // ENABLE(INSTANCE_COUNTER) || ENABLE(DETAILED_MEMORY_INFRA) 58 #endif // ENABLE(INSTANCE_COUNTER) || ENABLE(DETAILED_MEMORY_INFRA)
63 59
64 } // namespace WTF 60 } // namespace WTF
65 61
66 #endif 62 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/HexNumber.h ('k') | third_party/WebKit/Source/wtf/InstanceCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698