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

Unified Diff: include/core/SkTypes.h

Issue 1482343002: Revert of skstd -> std for unique_ptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « include/core/SkRefCnt.h ('k') | include/private/SkOncePtr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTypes.h
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index a722ef8d36378d4239b4a3988f36e5c73e3caf02..d9254acf5f776d8abda7b8d3486d834fcaa6e200 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -257,11 +257,7 @@
/** Returns 0 or 1 based on the condition
*/
-#if defined(_MSC_VER)
- #define SkToBool(cond) (!!(cond)) // MSVC doesn't like a cast.
-#else
- #define SkToBool(cond) static_cast<bool>(cond)
-#endif
+#define SkToBool(cond) ((cond) != 0)
#define SK_MaxS16 32767
#define SK_MinS16 -32767
« no previous file with comments | « include/core/SkRefCnt.h ('k') | include/private/SkOncePtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698