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

Unified Diff: base/threading/thread_checker.h

Issue 2542403003: Make ThreadChecker zero-sized
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/threading/thread_checker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread_checker.h
diff --git a/base/threading/thread_checker.h b/base/threading/thread_checker.h
index 1d4eb1c7b0b00ad79dbec27d1afb0238190d8fa2..1737fa027cedd3100785d5998509bf04010ed259 100644
--- a/base/threading/thread_checker.h
+++ b/base/threading/thread_checker.h
@@ -21,6 +21,9 @@ class ThreadCheckerDoNothing {
}
void DetachFromThread() {}
+
+ // Trick the compiler into making ThreadCheckerDoNothing zero-length.
+ int make_thread_checker_zero_sized_[0];
};
// ThreadChecker is a helper class used to help verify that some methods of a
« no previous file with comments | « no previous file | base/threading/thread_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698