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

Unified Diff: third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.cpp

Issue 2747193002: Fix instances of clang -Wbitfield-enum-conversion in Blink (Closed)
Patch Set: Add comment documenting why this cast is necessary 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/core/layout/ng/ng_constraint_space_builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.cpp
diff --git a/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.cpp b/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.cpp
index a6a9a698d8d03dcd90e0e31e0df5405243469220..c188b1e89431fff8632fb56f32980e15e99fb41d 100644
--- a/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.cpp
+++ b/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.cpp
@@ -40,7 +40,9 @@ SVGAnimatedPropertyBase::SVGAnimatedPropertyBase(
const QualifiedName& attributeName,
CSSPropertyID cssPropertyId)
: m_type(type),
- m_cssPropertyId(cssPropertyId),
+ // Explicitly cast cssPropertyId to silence warnings about bitfield
+ // truncation.
Nico 2017/03/14 18:50:00 Maybe also say why this is safe?
Reid Kleckner 2017/03/14 19:37:25 The DCHECK_EQ is already checking that this is saf
Nico 2017/03/14 19:52:24 Which dcheck? The `DCHECK_EQ(this->cssPropertyId()
+ m_cssPropertyId(static_cast<unsigned>(cssPropertyId)),
m_contextElement(contextElement),
m_attributeName(attributeName) {
DCHECK(m_contextElement);
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698