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

Unified Diff: third_party/WebKit/Source/wtf/SizeAssertions.h

Issue 2755793004: Move files in wtf/ to platform/wtf/ (Part 3). (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/Optional.h ('k') | third_party/WebKit/Source/wtf/StaticConstructors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/SizeAssertions.h
diff --git a/third_party/WebKit/Source/wtf/SizeAssertions.h b/third_party/WebKit/Source/wtf/SizeAssertions.h
index bc0496d6e7426a8bc2f107ca7796d3dcf6b01ebb..406f53597e1e1fb4db67549acdf04a094adbc4db 100644
--- a/third_party/WebKit/Source/wtf/SizeAssertions.h
+++ b/third_party/WebKit/Source/wtf/SizeAssertions.h
@@ -1,29 +1,9 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WTF_SizeAssertions_h
-#define WTF_SizeAssertions_h
+#include "platform/wtf/SizeAssertions.h"
-namespace WTF {
-
-// The ASSERT_SIZE macro can be used to check that a given struct is the same
-// size as a class. This is useful to visualize where the space is being used in
-// a class, as well as give a useful compile error message when the size doesn't
-// match the expected value.
-template <class T, class U>
-struct assert_size {
- template <int ActualSize, int ExpectedSize>
- struct assertSizeEqual {
- static_assert(ActualSize == ExpectedSize, "Class should stay small");
- static const bool innerValue = true;
- };
- static const bool value = assertSizeEqual<sizeof(T), sizeof(U)>::innerValue;
-};
-
-} // namespace WTF
-
-#define ASSERT_SIZE(className, sameSizeAsClassName) \
- static_assert(WTF::assert_size<className, sameSizeAsClassName>::value, "");
-
-#endif // WTF_SizeAssertions_h
+// The contents of this header was moved to platform/wtf as part of
+// WTF migration project. See the following post for details:
+// https://groups.google.com/a/chromium.org/d/msg/blink-dev/tLdAZCTlcAA/bYXVT8gYCAAJ
« no previous file with comments | « third_party/WebKit/Source/wtf/Optional.h ('k') | third_party/WebKit/Source/wtf/StaticConstructors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698