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

Unified Diff: sky/engine/core/dom/ElementData.h

Issue 719063002: Revert "Remove support for MSVC" (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/dom/ElementData.h
diff --git a/sky/engine/core/dom/ElementData.h b/sky/engine/core/dom/ElementData.h
index 1113e0604c07ea643c3493baec2fba77cb9bbb2e..101c4336387b11b4ee72d2cf73fd7acdbb4e2d3a 100644
--- a/sky/engine/core/dom/ElementData.h
+++ b/sky/engine/core/dom/ElementData.h
@@ -104,6 +104,11 @@ private:
template<typename T> inline thisType* to##thisType(const RefPtr<T>& data) { return to##thisType(data.get()); } \
DEFINE_TYPE_CASTS(thisType, ElementData, data, pointerPredicate, referencePredicate)
+#if COMPILER(MSVC)
+#pragma warning(push)
+#pragma warning(disable: 4200) // Disable "zero-sized array in struct/union" warning
+#endif
+
// SharableElementData is managed by ElementDataCache and is produced by
// the parser during page load for elements that have identical attributes. This
// is a memory optimization since it's very common for many elements to have
@@ -135,6 +140,10 @@ public:
DEFINE_ELEMENT_DATA_TYPE_CASTS(ShareableElementData, !data->isUnique(), !data.isUnique());
+#if COMPILER(MSVC)
+#pragma warning(pop)
+#endif
+
// UniqueElementData is created when an element needs to mutate its attributes
// or gains presentation attribute style (ex. width="10"). It does not need to
// be created to fill in values in the ElementData that are derived from

Powered by Google App Engine
This is Rietveld 408576698