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

Unified Diff: third_party/WebKit/Source/core/animation/InterpolationValue.h

Issue 1878253003: Allow explicit conversion operators and implement WTF::OwnPtr::operator bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/Source/core/animation/InterpolationValue.h
diff --git a/third_party/WebKit/Source/core/animation/InterpolationValue.h b/third_party/WebKit/Source/core/animation/InterpolationValue.h
index cf73188c81e67d0d059361100800a4b5c8447565..2b585ec173d392a636a5ec0f9a271bbff2aea17c 100644
--- a/third_party/WebKit/Source/core/animation/InterpolationValue.h
+++ b/third_party/WebKit/Source/core/animation/InterpolationValue.h
@@ -34,7 +34,7 @@ struct InterpolationValue {
nonInterpolableValue = other.nonInterpolableValue.release();
}
- operator bool() const { return interpolableValue; }
+ operator bool() const { return !!interpolableValue; }
Nico 2016/04/13 01:19:01 bleh, i hate that !! pattern. can we static_cast<b
alancutter (OOO until 2018) 2016/04/13 02:26:32 I dislike !! as well but static_cast<bool> is also
jbroman 2016/04/13 13:38:09 I actually don't mind !!, but static_cast<bool>(po
InterpolationValue clone() const
{

Powered by Google App Engine
This is Rietveld 408576698